home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / Technical Documentation / Inside Macintosh / IM—Devices (Preview) < prev    next >
MacBinary  |  1994-04-27  |  2.0 MB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Tue Sep 15 06:58:44 1992, modified Wed Apr 27 06:10:03 1994, creator 'HLX2', type 'ONLN', 2081995 bytes "IM�Devices (Preview)" , at 0x1fc54b 28604 bytes resource default (weak)
99% file data default
66% TrID raw Group 3 FAX bitmap default (weak)
33% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
50% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 49 4d d1 44 65 76 | 69 63 65 73 20 28 50 72 |..IM.Dev|ices (Pr|
|00000010| 65 76 69 65 77 29 00 00 | 00 00 00 00 00 00 00 00 |eview)..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 1f c4 cb 00 | 00 6f bc a6 db 72 64 a9 |........|.o...rd.|
|00000060| e3 ea 7b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..{.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 2c 4e 00 00 |........|....,N..|
|00000080| 49 4e 53 49 44 45 20 4d | 41 43 49 4e 54 4f 53 48 |INSIDE M|ACINTOSH|
|00000090| 0d 44 65 76 69 63 65 73 | 0d f0 09 41 70 70 6c 65 |.Devices|...Apple|
|000000a0| 20 43 6f 6d 70 75 74 65 | 72 2c 20 49 6e 63 2e 20 | Compute|r, Inc. |
|000000b0| 0d a9 20 31 39 39 31 2c | 20 41 70 70 6c 65 20 43 |.. 1991,| Apple C|
|000000c0| 6f 6d 70 75 74 65 72 2c | 20 49 6e 63 2e 0d 41 6c |omputer,| Inc..Al|
|000000d0| 6c 20 72 69 67 68 74 73 | 20 72 65 73 65 72 76 65 |l rights| reserve|
|000000e0| 64 2e 0d 50 72 69 6e 74 | 65 64 20 69 6e 20 74 68 |d..Print|ed in th|
|000000f0| 65 20 55 6e 69 74 65 64 | 20 53 74 61 74 65 73 20 |e United| States |
|00000100| 6f 66 20 0d 41 6d 65 72 | 69 63 61 2e 0d 54 68 65 |of .Amer|ica..The|
|00000110| 20 41 70 70 6c 65 20 6c | 6f 67 6f 20 69 73 20 61 | Apple l|ogo is a|
|00000120| 20 72 65 67 69 73 74 65 | 72 65 64 20 74 72 61 64 | registe|red trad|
|00000130| 65 6d 61 72 6b 20 6f 66 | 20 41 70 70 6c 65 20 43 |emark of| Apple C|
|00000140| 6f 6d 70 75 74 65 72 2c | 20 49 6e 63 2e 20 55 73 |omputer,| Inc. Us|
|00000150| 65 20 6f 66 20 74 68 65 | 20 d2 6b 65 79 62 6f 61 |e of the| .keyboa|
|00000160| 72 64 d3 20 0d 41 70 70 | 6c 65 20 6c 6f 67 6f 20 |rd. .App|le logo |
|00000170| 28 4f 70 74 69 6f 6e 2d | 53 68 69 66 74 2d 4b 29 |(Option-|Shift-K)|
|00000180| 20 66 6f 72 20 63 6f 6d | 6d 65 72 63 69 61 6c 20 | for com|mercial |
|00000190| 70 75 72 70 6f 73 65 73 | 20 77 69 74 68 6f 75 74 |purposes| without|
|000001a0| 20 74 68 65 20 70 72 69 | 6f 72 20 77 72 69 74 74 | the pri|or writt|
|000001b0| 65 6e 20 63 6f 6e 73 65 | 6e 74 20 6f 66 20 0d 41 |en conse|nt of .A|
|000001c0| 70 70 6c 65 20 6d 61 79 | 20 63 6f 6e 73 74 69 74 |pple may| constit|
|000001d0| 75 74 65 20 74 72 61 64 | 65 6d 61 72 6b 20 69 6e |ute trad|emark in|
|000001e0| 66 72 69 6e 67 65 6d 65 | 6e 74 20 61 6e 64 20 75 |fringeme|nt and u|
|000001f0| 6e 66 61 69 72 20 63 6f | 6d 70 65 2d 74 69 74 69 |nfair co|mpe-titi|
|00000200| 6f 6e 20 69 6e 20 76 69 | 6f 6c 61 74 69 6f 6e 20 |on in vi|olation |
|00000210| 6f 66 20 66 65 64 65 72 | 61 6c 20 61 6e 64 20 73 |of feder|al and s|
|00000220| 74 61 74 65 20 6c 61 77 | 73 2e 0d 41 70 70 6c 65 |tate law|s..Apple|
|00000230| 20 43 6f 6d 70 75 74 65 | 72 2c 20 49 6e 63 2e 20 | Compute|r, Inc. |
|00000240| 0d 32 30 35 32 35 20 4d | 61 72 69 61 6e 69 20 41 |.20525 M|ariani A|
|00000250| 76 65 6e 75 65 20 20 0d | 43 75 70 65 72 74 69 6e |venue .|Cupertin|
|00000260| 6f 2c 20 43 41 20 20 39 | 35 30 31 34 2d 36 32 39 |o, CA 9|5014-629|
|00000270| 39 0d 34 30 38 2d 39 39 | 36 2d 31 30 31 30 20 20 |9.408-99|6-1010 |
|00000280| 0d 41 70 70 6c 65 2c 20 | 74 68 65 20 41 70 70 6c |.Apple, |the Appl|
|00000290| 65 20 6c 6f 67 6f 2c 20 | 41 50 44 41 2c 20 41 70 |e logo, |APDA, Ap|
|000002a0| 70 6c 65 4c 69 6e 6b 2c | 20 41 70 70 6c 65 53 68 |pleLink,| AppleSh|
|000002b0| 61 72 65 2c 20 0d 41 70 | 70 6c 65 54 61 6c 6b 2c |are, .Ap|pleTalk,|
|000002c0| 20 41 70 70 6c 65 20 49 | 49 47 53 2c 20 41 2f 55 | Apple I|IGS, A/U|
|000002d0| 58 2c 20 45 74 68 65 72 | 54 61 6c 6b 2c 20 48 79 |X, Ether|Talk, Hy|
|000002e0| 70 65 72 43 61 72 64 2c | 20 48 79 70 65 72 2d 54 |perCard,| Hyper-T|
|000002f0| 61 6c 6b 2c 20 49 6d 61 | 67 65 57 72 69 74 65 72 |alk, Ima|geWriter|
|00000300| 2c 20 4c 61 73 65 72 57 | 72 69 74 65 72 2c 20 4c |, LaserW|riter, L|
|00000310| 6f 63 61 6c 54 61 6c 6b | 2c 20 4d 61 63 2c 20 4d |ocalTalk|, Mac, M|
|00000320| 61 63 69 6e 74 6f 73 68 | 2c 20 4d 50 57 2c 20 4d |acintosh|, MPW, M|
|00000330| 75 6c 74 69 46 69 6e 64 | 65 72 2c 20 53 41 4e 45 |ultiFind|er, SANE|
|00000340| 2c 20 61 6e 64 20 54 6f | 6b 65 6e 54 61 6c 6b 20 |, and To|kenTalk |
|00000350| 61 72 65 20 72 65 67 69 | 73 74 65 72 65 64 20 74 |are regi|stered t|
|00000360| 72 61 64 65 2d 6d 61 72 | 6b 73 20 6f 66 20 41 70 |rade-mar|ks of Ap|
|00000370| 70 6c 65 20 43 6f 6d 70 | 75 74 65 72 2c 20 49 6e |ple Comp|uter, In|
|00000380| 63 2e 0d 41 70 70 6c 65 | 20 44 65 73 6b 74 6f 70 |c..Apple| Desktop|
|00000390| 20 42 75 73 2c 20 42 61 | 6c 6c 6f 6f 6e 20 48 65 | Bus, Ba|lloon He|
|000003a0| 6c 70 2c 20 46 69 6e 64 | 65 72 2c 20 4b 61 6e 6a |lp, Find|er, Kanj|
|000003b0| 69 54 61 6c 6b 2c 20 4d | 6f 6f 66 2c 20 51 75 69 |iTalk, M|oof, Qui|
|000003c0| 63 6b 44 72 61 77 2c 20 | 52 65 73 45 64 69 74 2c |ckDraw, |ResEdit,|
|000003d0| 20 54 72 75 65 54 79 70 | 65 2c 20 61 6e 64 20 5a | TrueTyp|e, and Z|
|000003e0| 68 6f 6e 67 2d 57 65 6e | 20 54 61 6c 6b 20 61 72 |hong-Wen| Talk ar|
|000003f0| 65 20 74 72 61 64 65 2d | 6d 61 72 6b 73 20 6f 66 |e trade-|marks of|
|00000400| 20 41 70 70 6c 65 20 43 | 6f 6d 70 75 74 65 72 2c | Apple C|omputer,|
|00000410| 20 49 6e 63 2e 0d 48 65 | 6c 76 65 74 69 63 61 20 | Inc..He|lvetica |
|00000420| 61 6e 64 20 54 69 6d 65 | 73 20 61 72 65 20 0d 72 |and Time|s are .r|
|00000430| 65 67 69 73 74 65 72 65 | 64 20 74 72 61 64 65 6d |egistere|d tradem|
|00000440| 61 72 6b 73 20 6f 66 20 | 0d 4c 69 6e 6f 74 79 70 |arks of |.Linotyp|
|00000450| 65 20 43 6f 6d 70 61 6e | 79 2e 0d 49 54 43 20 5a |e Compan|y..ITC Z|
|00000460| 61 70 66 20 44 69 6e 67 | 62 61 74 73 20 69 73 20 |apf Ding|bats is |
|00000470| 61 20 72 65 67 69 73 74 | 65 72 65 64 20 74 72 61 |a regist|ered tra|
|00000480| 64 65 6d 61 72 6b 20 6f | 66 20 49 6e 74 65 72 6e |demark o|f Intern|
|00000490| 61 74 69 6f 6e 61 6c 20 | 54 79 70 65 66 61 63 65 |ational |Typeface|
|000004a0| 20 43 6f 72 70 6f 72 61 | 74 69 6f 6e 2e 0d 4d 61 | Corpora|tion..Ma|
|000004b0| 63 50 61 69 6e 74 20 69 | 73 20 61 20 72 65 67 69 |cPaint i|s a regi|
|000004c0| 73 74 65 72 65 64 20 74 | 72 61 64 65 2d 6d 61 72 |stered t|rade-mar|
|000004d0| 6b 20 6f 66 20 43 6c 61 | 72 69 73 20 43 6f 72 70 |k of Cla|ris Corp|
|000004e0| 6f 72 61 74 69 6f 6e 2e | 0d 4e 75 42 75 73 20 69 |oration.|.NuBus i|
|000004f0| 73 20 61 20 74 72 61 64 | 65 6d 61 72 6b 20 6f 66 |s a trad|emark of|
|00000500| 20 54 65 78 61 73 20 0d | 49 6e 73 74 72 75 6d 65 | Texas .|Instrume|
|00000510| 6e 74 73 2e 0d 50 6f 73 | 74 53 63 72 69 70 74 20 |nts..Pos|tScript |
|00000520| 69 73 20 61 20 72 65 67 | 69 73 74 65 72 65 64 20 |is a reg|istered |
|00000530| 74 72 61 64 65 2d 6d 61 | 72 6b 2c 20 61 6e 64 20 |trade-ma|rk, and |
|00000540| 49 6c 6c 75 73 74 72 61 | 74 6f 72 20 69 73 20 61 |Illustra|tor is a|
|00000550| 20 0d 74 72 61 64 65 6d | 61 72 6b 2c 20 6f 66 20 | .tradem|ark, of |
|00000560| 41 64 6f 62 65 20 53 79 | 73 74 65 6d 73 20 0d 49 |Adobe Sy|stems .I|
|00000570| 6e 63 6f 72 70 6f 72 61 | 74 65 64 2e 0d 53 6f 6e |ncorpora|ted..Son|
|00000580| 79 20 69 73 20 61 20 72 | 65 67 69 73 74 65 72 65 |y is a r|egistere|
|00000590| 64 20 74 72 61 64 65 6d | 61 72 6b 20 6f 66 20 53 |d tradem|ark of S|
|000005a0| 6f 6e 79 20 43 6f 72 70 | 6f 72 61 74 69 6f 6e 2e |ony Corp|oration.|
|000005b0| 0d 55 4e 49 58 20 69 73 | 20 61 20 72 65 67 69 73 |.UNIX is| a regis|
|000005c0| 74 65 72 65 64 20 74 72 | 61 64 65 6d 61 72 6b 20 |tered tr|ademark |
|000005d0| 6f 66 20 55 4e 49 58 20 | 53 79 73 74 65 6d 20 4c |of UNIX |System L|
|000005e0| 61 62 6f 72 61 74 6f 72 | 69 65 73 2c 20 49 6e 63 |aborator|ies, Inc|
|000005f0| 2e 0d 53 69 6d 75 6c 74 | 61 6e 65 6f 75 73 6c 79 |..Simult|aneously|
|00000600| 20 70 75 62 6c 69 73 68 | 65 64 20 69 6e 20 74 68 | publish|ed in th|
|00000610| 65 20 55 6e 69 74 65 64 | 20 53 74 61 74 65 73 20 |e United| States |
|00000620| 61 6e 64 20 43 61 6e 61 | 64 61 2e 0d 4c 69 6d 69 |and Cana|da..Limi|
|00000630| 74 65 64 20 57 61 72 72 | 61 6e 74 79 20 6f 6e 20 |ted Warr|anty on |
|00000640| 4d 65 64 69 61 20 61 6e | 64 20 52 65 70 6c 61 63 |Media an|d Replac|
|00000650| 65 6d 65 6e 74 0d 45 76 | 65 6e 20 74 68 6f 75 67 |ement.Ev|en thoug|
|00000660| 68 20 41 70 70 6c 65 20 | 68 61 73 20 0d 72 65 76 |h Apple |has .rev|
|00000670| 69 65 77 65 64 20 74 68 | 69 73 20 6d 61 6e 75 61 |iewed th|is manua|
|00000680| 6c 2c 20 41 50 50 4c 45 | 20 4d 41 4b 45 53 20 4e |l, APPLE| MAKES N|
|00000690| 4f 20 57 41 52 52 41 4e | 54 59 20 4f 52 20 52 45 |O WARRAN|TY OR RE|
|000006a0| 50 52 45 53 45 4e 54 41 | 54 49 4f 4e 2c 20 45 49 |PRESENTA|TION, EI|
|000006b0| 54 48 45 52 20 45 58 50 | 52 45 53 53 20 4f 52 20 |THER EXP|RESS OR |
|000006c0| 49 4d 50 4c 49 45 44 2c | 20 57 49 54 48 20 52 45 |IMPLIED,| WITH RE|
|000006d0| 53 50 45 43 54 20 54 4f | 20 54 48 49 53 20 4d 41 |SPECT TO| THIS MA|
|000006e0| 4e 55 41 4c 2c 20 49 54 | 53 20 51 55 41 4c 49 54 |NUAL, IT|S QUALIT|
|000006f0| 59 2c 20 41 43 43 55 52 | 41 43 59 2c 20 4d 45 52 |Y, ACCUR|ACY, MER|
|00000700| 43 48 41 4e 54 2d 41 42 | 49 4c 49 54 59 2c 20 4f |CHANT-AB|ILITY, O|
|00000710| 52 20 46 49 54 4e 45 53 | 53 20 46 4f 52 20 41 20 |R FITNES|S FOR A |
|00000720| 50 41 52 54 49 43 55 4c | 41 52 20 50 55 52 50 4f |PARTICUL|AR PURPO|
|00000730| 53 45 2e 20 41 53 20 41 | 20 52 45 53 55 4c 54 2c |SE. AS A| RESULT,|
|00000740| 20 54 48 49 53 20 0d 4d | 41 4e 55 41 4c 20 49 53 | THIS .M|ANUAL IS|
|00000750| 20 53 4f 4c 44 20 d2 41 | 53 20 0d 49 53 2c d3 20 | SOLD .A|S .IS,. |
|00000760| 41 4e 44 20 59 4f 55 2c | 20 54 48 45 20 50 55 52 |AND YOU,| THE PUR|
|00000770| 2d 43 48 41 53 45 52 2c | 20 41 52 45 20 41 53 53 |-CHASER,| ARE ASS|
|00000780| 55 4d 49 4e 47 20 54 48 | 45 20 45 4e 54 49 52 45 |UMING TH|E ENTIRE|
|00000790| 20 52 49 53 4b 20 41 53 | 20 54 4f 20 49 54 53 20 | RISK AS| TO ITS |
|000007a0| 51 55 41 4c 49 54 59 20 | 41 4e 44 20 0d 41 43 43 |QUALITY |AND .ACC|
|000007b0| 55 52 41 43 59 2e 20 20 | 0d 49 4e 20 4e 4f 20 45 |URACY. |.IN NO E|
|000007c0| 56 45 4e 54 20 57 49 4c | 4c 20 41 50 50 4c 45 20 |VENT WIL|L APPLE |
|000007d0| 42 45 20 4c 49 41 42 4c | 45 20 46 4f 52 20 44 49 |BE LIABL|E FOR DI|
|000007e0| 52 45 43 54 2c 20 0d 49 | 4e 44 49 52 45 43 54 2c |RECT, .I|NDIRECT,|
|000007f0| 20 53 50 45 43 49 41 4c | 2c 20 0d 49 4e 43 49 44 | SPECIAL|, .INCID|
|00000800| 45 4e 54 41 4c 2c 20 4f | 52 20 43 4f 4e 53 45 2d |ENTAL, O|R CONSE-|
|00000810| 51 55 45 4e 54 49 41 4c | 20 44 41 4d 41 47 45 53 |QUENTIAL| DAMAGES|
|00000820| 20 0d 52 45 53 55 4c 54 | 49 4e 47 20 46 52 4f 4d | .RESULT|ING FROM|
|00000830| 20 41 4e 59 20 0d 44 45 | 46 45 43 54 20 4f 52 20 | ANY .DE|FECT OR |
|00000840| 49 4e 41 43 43 55 52 41 | 43 59 20 49 4e 20 54 48 |INACCURA|CY IN TH|
|00000850| 49 53 20 4d 41 4e 55 41 | 4c 2c 20 65 76 65 6e 20 |IS MANUA|L, even |
|00000860| 69 66 20 61 64 76 69 73 | 65 64 20 6f 66 20 74 68 |if advis|ed of th|
|00000870| 65 20 70 6f 73 73 69 62 | 69 6c 69 74 79 20 6f 66 |e possib|ility of|
|00000880| 20 73 75 63 68 20 64 61 | 6d 61 67 65 73 2e 20 20 | such da|mages. |
|00000890| 0d 54 48 45 20 57 41 52 | 52 41 4e 54 59 20 41 4e |.THE WAR|RANTY AN|
|000008a0| 44 20 52 45 4d 45 44 49 | 45 53 20 53 45 54 20 46 |D REMEDI|ES SET F|
|000008b0| 4f 52 54 48 20 41 42 4f | 56 45 20 41 52 45 20 45 |ORTH ABO|VE ARE E|
|000008c0| 58 43 4c 55 53 49 56 45 | 20 41 4e 44 20 49 4e 20 |XCLUSIVE| AND IN |
|000008d0| 4c 49 45 55 20 4f 46 20 | 41 4c 4c 20 0d 4f 54 48 |LIEU OF |ALL .OTH|
|000008e0| 45 52 53 2c 20 4f 52 41 | 4c 20 4f 52 20 0d 57 52 |ERS, ORA|L OR .WR|
|000008f0| 49 54 54 45 4e 2c 20 45 | 58 50 52 45 53 53 20 4f |ITTEN, E|XPRESS O|
|00000900| 52 20 0d 49 4d 50 4c 49 | 45 44 2e 20 4e 6f 20 41 |R .IMPLI|ED. No A|
|00000910| 70 70 6c 65 20 64 65 61 | 6c 65 72 2c 20 61 67 65 |pple dea|ler, age|
|00000920| 6e 74 2c 20 6f 72 20 65 | 6d 70 6c 6f 79 65 65 20 |nt, or e|mployee |
|00000930| 69 73 20 0d 61 75 74 68 | 6f 72 69 7a 65 64 20 74 |is .auth|orized t|
|00000940| 6f 20 6d 61 6b 65 20 61 | 6e 79 20 0d 6d 6f 64 69 |o make a|ny .modi|
|00000950| 66 69 63 61 74 69 6f 6e | 2c 20 65 78 74 65 6e 73 |fication|, extens|
|00000960| 69 6f 6e 2c 20 6f 72 20 | 0d 61 64 64 69 74 69 6f |ion, or |.additio|
|00000970| 6e 20 74 6f 20 74 68 69 | 73 20 77 61 72 72 61 6e |n to thi|s warran|
|00000980| 74 79 2e 20 20 0d 53 6f | 6d 65 20 73 74 61 74 65 |ty. .So|me state|
|00000990| 73 20 64 6f 20 6e 6f 74 | 20 61 6c 6c 6f 77 20 74 |s do not| allow t|
|000009a0| 68 65 20 65 78 63 6c 75 | 73 69 6f 6e 20 6f 72 20 |he exclu|sion or |
|000009b0| 6c 69 6d 69 74 61 74 69 | 6f 6e 20 6f 66 20 0d 69 |limitati|on of .i|
|000009c0| 6d 70 6c 69 65 64 20 77 | 61 72 72 61 6e 74 69 65 |mplied w|arrantie|
|000009d0| 73 20 6f 72 20 6c 69 61 | 62 69 6c 69 74 79 20 66 |s or lia|bility f|
|000009e0| 6f 72 20 69 6e 63 69 64 | 65 6e 74 61 6c 20 6f 72 |or incid|ental or|
|000009f0| 20 63 6f 6e 73 65 71 75 | 65 6e 74 69 61 6c 20 64 | consequ|ential d|
|00000a00| 61 6d 61 67 65 73 2c 20 | 73 6f 20 74 68 65 20 61 |amages, |so the a|
|00000a10| 62 6f 76 65 20 0d 6c 69 | 6d 69 74 61 74 69 6f 6e |bove .li|mitation|
|00000a20| 20 6f 72 20 65 78 63 6c | 75 73 69 6f 6e 20 6d 61 | or excl|usion ma|
|00000a30| 79 20 6e 6f 74 20 61 70 | 70 6c 79 20 74 6f 20 79 |y not ap|ply to y|
|00000a40| 6f 75 2e 20 54 68 69 73 | 20 77 61 72 72 61 6e 74 |ou. This| warrant|
|00000a50| 79 20 67 69 76 65 73 20 | 79 6f 75 20 73 70 65 63 |y gives |you spec|
|00000a60| 69 66 69 63 20 6c 65 67 | 61 6c 20 72 69 67 68 74 |ific leg|al right|
|00000a70| 73 2c 20 61 6e 64 20 79 | 6f 75 20 6d 61 79 20 61 |s, and y|ou may a|
|00000a80| 6c 73 6f 20 68 61 76 65 | 20 6f 74 68 65 72 20 72 |lso have| other r|
|00000a90| 69 67 68 74 73 20 77 68 | 69 63 68 20 76 61 72 79 |ights wh|ich vary|
|00000aa0| 20 66 72 6f 6d 20 73 74 | 61 74 65 20 74 6f 20 73 | from st|ate to s|
|00000ab0| 74 61 74 65 2e 0d 54 68 | 65 20 44 65 76 69 63 65 |tate..Th|e Device|
|00000ac0| 20 4d 61 6e 61 67 65 72 | 0d 49 6e 74 72 6f 64 75 | Manager|.Introdu|
|00000ad0| 63 74 69 6f 6e 20 74 6f | 20 44 65 76 69 63 65 73 |ction to| Devices|
|00000ae0| 20 61 6e 64 20 44 72 69 | 76 65 72 73 14 14 31 2d | and Dri|vers..1-|
|00000af0| 33 0d 41 62 6f 75 74 20 | 74 68 65 20 44 65 76 69 |3.About |the Devi|
|00000b00| 63 65 20 4d 61 6e 61 67 | 65 72 14 14 31 2d 34 0d |ce Manag|er..1-4.|
|00000b10| 55 73 69 6e 67 20 74 68 | 65 20 44 65 76 69 63 65 |Using th|e Device|
|00000b20| 20 4d 61 6e 61 67 65 72 | 14 14 31 2d 37 0d 4f 70 | Manager|..1-7.Op|
|00000b30| 65 6e 69 6e 67 20 61 6e | 64 20 43 6c 6f 73 69 6e |ening an|d Closin|
|00000b40| 67 20 44 65 76 69 63 65 | 20 44 72 69 76 65 72 73 |g Device| Drivers|
|00000b50| 14 14 31 2d 38 0d 43 6f | 6d 6d 75 6e 69 63 61 74 |..1-8.Co|mmunicat|
|00000b60| 69 6e 67 20 57 69 74 68 | 20 44 65 76 69 63 65 20 |ing With| Device |
|00000b70| 44 72 69 76 65 72 73 14 | 14 31 2d 31 30 0d 43 6f |Drivers.|.1-10.Co|
|00000b80| 6e 74 72 6f 6c 6c 69 6e | 67 20 61 6e 64 20 4d 6f |ntrollin|g and Mo|
|00000b90| 6e 69 74 6f 72 69 6e 67 | 20 44 65 76 69 63 65 20 |nitoring| Device |
|00000ba0| 44 72 69 76 65 72 73 14 | 14 31 2d 31 33 0d 52 65 |Drivers.|.1-13.Re|
|00000bb0| 66 65 72 65 6e 63 65 20 | 74 6f 20 74 68 65 20 44 |ference |to the D|
|00000bc0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 14 14 31 |evice Ma|nager..1|
|00000bd0| 2d 31 35 0d 44 61 74 61 | 20 53 74 72 75 63 74 75 |-15.Data| Structu|
|00000be0| 72 65 73 14 14 31 2d 31 | 35 0d 52 6f 75 74 69 6e |res..1-1|5.Routin|
|00000bf0| 65 73 14 14 31 2d 31 38 | 0d 4f 70 65 6e 69 6e 67 |es..1-18|.Opening|
|00000c00| 20 61 6e 64 20 43 6c 6f | 73 69 6e 67 20 44 65 76 | and Clo|sing Dev|
|00000c10| 69 63 65 20 44 72 69 76 | 65 72 73 14 14 31 2d 31 |ice Driv|ers..1-1|
|00000c20| 38 0d 52 65 61 64 69 6e | 67 20 46 72 6f 6d 20 61 |8.Readin|g From a|
|00000c30| 6e 64 20 57 72 69 74 69 | 6e 67 20 54 6f 20 44 65 |nd Writi|ng To De|
|00000c40| 76 69 63 65 73 14 14 31 | 2d 32 35 0d 43 6f 6e 74 |vices..1|-25.Cont|
|00000c50| 72 6f 6c 6c 69 6e 67 20 | 61 6e 64 20 4d 6f 6e 69 |rolling |and Moni|
|00000c60| 74 6f 72 69 6e 67 20 44 | 65 76 69 63 65 73 14 14 |toring D|evices..|
|00000c70| 31 2d 33 31 0d 53 75 6d | 6d 61 72 79 20 6f 66 20 |1-31.Sum|mary of |
|00000c80| 74 68 65 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |the Devi|ce Manag|
|00000c90| 65 72 14 14 31 2d 33 39 | 0d 31 54 68 65 20 44 65 |er..1-39|.1The De|
|00000ca0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 0d 54 68 69 |vice Man|ager.Thi|
|00000cb0| 73 20 63 68 61 70 74 65 | 72 20 64 65 73 63 72 69 |s chapte|r descri|
|00000cc0| 62 65 73 20 68 6f 77 20 | 79 6f 75 72 20 61 70 70 |bes how |your app|
|00000cd0| 6c 69 63 61 74 69 6f 6e | 20 63 61 6e 20 75 73 65 |lication| can use|
|00000ce0| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00000cf0| 67 65 72 20 74 6f 20 74 | 72 61 6e 73 66 65 72 20 |ger to t|ransfer |
|00000d00| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 69 6e 74 6f |informat|ion into|
|00000d10| 20 61 6e 64 20 6f 75 74 | 20 6f 66 20 74 68 65 20 | and out| of the |
|00000d20| 4d 61 63 69 6e 74 6f 73 | 68 2e 20 54 68 65 20 44 |Macintos|h. The D|
|00000d30| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 63 6f |evice Ma|nager co|
|00000d40| 6e 74 72 6f 6c 73 20 74 | 68 65 20 65 78 63 68 61 |ntrols t|he excha|
|00000d50| 6e 67 65 20 6f 66 20 69 | 6e 66 6f 72 6d 61 74 69 |nge of i|nformati|
|00000d60| 6f 6e 20 62 65 74 77 65 | 65 6e 20 61 70 70 6c 69 |on betwe|en appli|
|00000d70| 63 61 74 69 6f 6e 73 20 | 61 6e 64 20 68 61 72 64 |cations |and hard|
|00000d80| 77 61 72 65 20 64 65 76 | 69 63 65 73 2e 20 4f 66 |ware dev|ices. Of|
|00000d90| 74 65 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |ten appl|ications|
|00000da0| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 65 20 77 69 74 | communi|cate wit|
|00000db0| 68 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |h the De|vice Man|
|00000dc0| 61 67 65 72 20 69 6e 64 | 69 72 65 63 74 6c 79 2c |ager ind|irectly,|
|00000dd0| 20 62 79 20 63 61 6c 6c | 69 6e 67 20 72 6f 75 74 | by call|ing rout|
|00000de0| 69 6e 65 73 20 6f 66 20 | 6f 74 68 65 72 20 6d 61 |ines of |other ma|
|00000df0| 6e 61 67 65 72 73 20 28 | 66 6f 72 20 65 78 61 6d |nagers (|for exam|
|00000e00| 70 6c 65 2c 20 74 68 65 | 20 46 69 6c 65 20 4d 61 |ple, the| File Ma|
|00000e10| 6e 61 67 65 72 29 20 77 | 68 69 63 68 20 75 73 65 |nager) w|hich use|
|00000e20| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00000e30| 67 65 72 2e 20 48 6f 77 | 65 76 65 72 2c 20 73 6f |ger. How|ever, so|
|00000e40| 6d 65 74 69 6d 65 73 20 | 61 70 70 6c 69 63 61 74 |metimes |applicat|
|00000e50| 69 6f 6e 73 20 6d 75 73 | 74 20 63 61 6c 6c 20 44 |ions mus|t call D|
|00000e60| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 72 6f |evice Ma|nager ro|
|00000e70| 75 74 69 6e 65 73 20 64 | 69 72 65 63 74 6c 79 2e |utines d|irectly.|
|00000e80| 0d 52 65 61 64 20 74 68 | 65 20 69 6e 66 6f 72 6d |.Read th|e inform|
|00000e90| 61 74 69 6f 6e 20 69 6e | 20 74 68 69 73 20 63 68 |ation in| this ch|
|00000ea0| 61 70 74 65 72 20 69 66 | 20 79 6f 75 72 20 61 70 |apter if| your ap|
|00000eb0| 70 6c 69 63 61 74 69 6f | 6e 20 6e 65 65 64 73 20 |plicatio|n needs |
|00000ec0| 74 6f 20 75 73 65 20 74 | 68 65 20 44 65 76 69 63 |to use t|he Devic|
|00000ed0| 65 20 4d 61 6e 61 67 65 | 72 20 74 6f 20 63 6f 6d |e Manage|r to com|
|00000ee0| 6d 75 6e 69 63 61 74 65 | 20 77 69 74 68 20 61 20 |municate| with a |
|00000ef0| 64 65 76 69 63 65 2e 20 | 46 6f 72 20 65 78 61 6d |device. |For exam|
|00000f00| 70 6c 65 2c 20 79 6f 75 | 20 6d 69 67 68 74 20 6e |ple, you| might n|
|00000f10| 65 65 64 20 74 6f 20 75 | 73 65 20 74 68 65 20 44 |eed to u|se the D|
|00000f20| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 74 6f |evice Ma|nager to|
|00000f30| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 65 20 77 69 74 | communi|cate wit|
|00000f40| 68 20 61 20 6d 6f 64 65 | 6d 20 64 65 76 69 63 65 |h a mode|m device|
|00000f50| 20 6f 6e 20 61 6e 20 65 | 78 70 61 6e 73 69 6f 6e | on an e|xpansion|
|00000f60| 20 63 61 72 64 2e 20 59 | 6f 75 20 77 6f 75 6c 64 | card. Y|ou would|
|00000f70| 20 70 72 6f 62 61 62 6c | 79 20 6e 6f 74 20 6e 65 | probabl|y not ne|
|00000f80| 65 64 20 74 6f 20 75 73 | 65 20 74 68 65 20 44 65 |ed to us|e the De|
|00000f90| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 74 6f 20 |vice Man|ager to |
|00000fa0| 63 6f 6d 6d 75 6e 69 63 | 61 74 65 20 77 69 74 68 |communic|ate with|
|00000fb0| 20 61 20 67 72 61 70 68 | 69 63 73 20 64 65 76 69 | a graph|ics devi|
|00000fc0| 63 65 20 6f 6e 20 61 6e | 20 65 78 70 61 6e 73 69 |ce on an| expansi|
|00000fd0| 6f 6e 20 63 61 72 64 2c | 20 61 73 20 79 6f 75 20 |on card,| as you |
|00000fe0| 77 6f 75 6c 64 20 75 73 | 65 20 51 75 69 63 6b 44 |would us|e QuickD|
|00000ff0| 72 61 77 20 69 6e 73 74 | 65 61 64 2e 20 59 6f 75 |raw inst|ead. You|
|00001000| 20 61 6c 73 6f 20 64 6f | 20 6e 6f 74 20 6e 65 65 | also do| not nee|
|00001010| 64 20 74 6f 20 75 73 65 | 20 74 68 65 20 44 65 76 |d to use| the Dev|
|00001020| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 64 69 72 65 |ice Mana|ger dire|
|00001030| 63 74 6c 79 20 74 6f 20 | 63 6f 6d 6d 75 6e 69 63 |ctly to |communic|
|00001040| 61 74 65 20 77 69 74 68 | 20 64 69 73 6b 20 64 72 |ate with| disk dr|
|00001050| 69 76 65 73 20 6f 72 20 | 70 72 69 6e 74 65 72 73 |ives or |printers|
|00001060| 2c 20 61 73 20 79 6f 75 | 20 63 61 6e 20 75 73 65 |, as you| can use|
|00001070| 20 74 68 65 20 46 69 6c | 65 20 4d 61 6e 61 67 65 | the Fil|e Manage|
|00001080| 72 20 6f 72 20 74 68 65 | 20 50 72 69 6e 74 69 6e |r or the| Printin|
|00001090| 67 20 4d 61 6e 61 67 65 | 72 2e 0d 54 6f 20 75 73 |g Manage|r..To us|
|000010a0| 65 20 74 68 69 73 20 63 | 68 61 70 74 65 72 2c 20 |e this c|hapter, |
|000010b0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 62 65 20 66 61 |you shou|ld be fa|
|000010c0| 6d 69 6c 69 61 72 20 77 | 69 74 68 20 72 65 73 6f |miliar w|ith reso|
|000010d0| 75 72 63 65 73 20 61 6e | 64 20 68 6f 77 20 74 68 |urces an|d how th|
|000010e0| 65 20 73 79 73 74 65 6d | 20 73 65 61 72 63 68 65 |e system| searche|
|000010f0| 73 20 72 65 73 6f 75 72 | 63 65 20 66 69 6c 65 73 |s resour|ce files|
|00001100| 2e 20 53 65 65 20 74 68 | 65 20 63 68 61 70 74 65 |. See th|e chapte|
|00001110| 72 20 d2 54 68 65 20 52 | 65 73 6f 75 72 63 65 20 |r .The R|esource |
|00001120| 4d 61 6e 61 67 65 72 d3 | 20 69 6e 20 74 68 65 20 |Manager.| in the |
|00001130| 49 6e 73 69 64 65 20 4d | 61 63 69 6e 74 6f 73 68 |Inside M|acintosh|
|00001140| 3a 20 4d 61 63 69 6e 74 | 6f 73 68 20 54 6f 6f 6c |: Macint|osh Tool|
|00001150| 62 6f 78 20 76 6f 6c 75 | 6d 65 2e 0d 54 68 69 73 |box volu|me..This|
|00001160| 20 63 68 61 70 74 65 72 | 20 69 6e 63 6c 75 64 65 | chapter| include|
|00001170| 73 0d 6e 09 61 20 62 72 | 69 65 66 20 69 6e 74 72 |s.n.a br|ief intr|
|00001180| 6f 64 75 63 74 69 6f 6e | 20 74 6f 20 64 65 76 69 |oduction| to devi|
|00001190| 63 65 73 20 61 6e 64 20 | 64 65 76 69 63 65 20 64 |ces and |device d|
|000011a0| 72 69 76 65 72 73 20 28 | 74 68 65 20 70 72 6f 67 |rivers (|the prog|
|000011b0| 72 61 6d 73 20 74 68 61 | 74 20 63 6f 6e 74 72 6f |rams tha|t contro|
|000011c0| 6c 20 64 65 76 69 63 65 | 73 29 0d 6e 09 61 20 64 |l device|s).n.a d|
|000011d0| 65 73 63 72 69 70 74 69 | 6f 6e 20 6f 66 20 74 68 |escripti|on of th|
|000011e0| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|000011f0| 20 61 6e 64 20 68 6f 77 | 20 69 74 20 6d 61 6e 61 | and how| it mana|
|00001200| 67 65 73 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |ges devi|ce drive|
|00001210| 72 73 20 0d 6e 09 61 20 | 64 69 73 63 75 73 73 69 |rs .n.a |discussi|
|00001220| 6f 6e 20 6f 66 20 68 6f | 77 20 74 6f 20 75 73 65 |on of ho|w to use|
|00001230| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00001240| 72 6f 75 74 69 6e 65 73 | 20 74 6f 20 65 78 63 68 |routines| to exch|
|00001250| 61 6e 67 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ange inf|ormation|
|00001260| 20 77 69 74 68 20 64 65 | 76 69 63 65 73 20 61 6e | with de|vices an|
|00001270| 64 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 73 |d device| drivers|
|00001280| 0d 59 6f 75 20 63 61 6e | 20 66 69 6e 64 20 73 70 |.You can| find sp|
|00001290| 65 63 69 66 69 63 20 69 | 6e 66 6f 72 6d 61 74 69 |ecific i|nformati|
|000012a0| 6f 6e 20 61 62 6f 75 74 | 20 74 68 65 20 73 74 61 |on about| the sta|
|000012b0| 6e 64 61 72 64 20 4d 61 | 63 69 6e 74 6f 73 68 20 |ndard Ma|cintosh |
|000012c0| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 73 2c 20 |device d|rivers, |
|000012d0| 6c 69 6b 65 20 74 68 65 | 20 44 69 73 6b 20 44 72 |like the| Disk Dr|
|000012e0| 69 76 65 72 20 61 6e 64 | 20 74 68 65 20 53 65 72 |iver and| the Ser|
|000012f0| 69 61 6c 20 44 72 69 76 | 65 72 73 2c 20 69 6e 20 |ial Driv|ers, in |
|00001300| 73 65 70 61 72 61 74 65 | 20 63 68 61 70 74 65 72 |separate| chapter|
|00001310| 73 20 6f 66 20 74 68 69 | 73 20 62 6f 6f 6b 2e 20 |s of thi|s book. |
|00001320| 49 66 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 63 |If you w|ant to c|
|00001330| 72 65 61 74 65 20 79 6f | 75 72 20 6f 77 6e 20 64 |reate yo|ur own d|
|00001340| 65 76 69 63 65 20 64 72 | 69 76 65 72 20 6f 72 20 |evice dr|iver or |
|00001350| 64 65 73 6b 20 61 63 63 | 65 73 73 6f 72 79 2c 20 |desk acc|essory, |
|00001360| 79 6f 75 20 73 68 6f 75 | 6c 64 20 66 69 72 73 74 |you shou|ld first|
|00001370| 20 72 65 61 64 20 74 68 | 69 73 20 63 68 61 70 74 | read th|is chapt|
|00001380| 65 72 20 61 6e 64 20 74 | 68 65 6e 20 72 65 61 64 |er and t|hen read|
|00001390| 20 74 68 65 20 63 68 61 | 70 74 65 72 20 d2 57 72 | the cha|pter .Wr|
|000013a0| 69 74 69 6e 67 20 59 6f | 75 72 20 4f 77 6e 20 44 |iting Yo|ur Own D|
|000013b0| 65 76 69 63 65 20 44 72 | 69 76 65 72 d3 20 69 6e |evice Dr|iver. in|
|000013c0| 20 74 68 69 73 20 62 6f | 6f 6b 2e 0d 49 6e 74 72 | this bo|ok..Intr|
|000013d0| 6f 64 75 63 74 69 6f 6e | 20 74 6f 20 44 65 76 69 |oduction| to Devi|
|000013e0| 63 65 73 20 61 6e 64 20 | 44 72 69 76 65 72 73 0d |ces and |Drivers.|
|000013f0| 41 20 64 65 76 69 63 65 | 20 69 73 20 61 20 70 68 |A device| is a ph|
|00001400| 79 73 69 63 61 6c 20 70 | 61 72 74 20 6f 66 20 74 |ysical p|art of t|
|00001410| 68 65 20 4d 61 63 69 6e | 74 6f 73 68 2c 20 6f 72 |he Macin|tosh, or|
|00001420| 20 61 20 70 69 65 63 65 | 20 6f 66 20 65 78 74 65 | a piece| of exte|
|00001430| 72 6e 61 6c 20 65 71 75 | 69 70 6d 65 6e 74 2c 20 |rnal equ|ipment, |
|00001440| 74 68 61 74 20 63 61 6e | 20 65 78 63 68 61 6e 67 |that can| exchang|
|00001450| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 77 69 |e inform|ation wi|
|00001460| 74 68 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 20 |th appli|cations |
|00001470| 6f 72 20 77 69 74 68 20 | 74 68 65 20 4f 70 65 72 |or with |the Oper|
|00001480| 61 74 69 6e 67 20 53 79 | 73 74 65 6d 2e 20 49 6e |ating Sy|stem. In|
|00001490| 70 75 74 20 64 65 76 69 | 63 65 73 20 74 72 61 6e |put devi|ces tran|
|000014a0| 73 66 65 72 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |sfer inf|ormation|
|000014b0| 20 69 6e 74 6f 20 74 68 | 65 20 4d 61 63 69 6e 74 | into th|e Macint|
|000014c0| 6f 73 68 2c 20 77 68 69 | 6c 65 20 6f 75 74 70 75 |osh, whi|le outpu|
|000014d0| 74 20 64 65 76 69 63 65 | 73 20 72 65 63 65 69 76 |t device|s receiv|
|000014e0| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 66 72 |e inform|ation fr|
|000014f0| 6f 6d 20 74 68 65 20 4d | 61 63 69 6e 74 6f 73 68 |om the M|acintosh|
|00001500| 2e 20 41 6e 20 49 2f 4f | 20 64 65 76 69 63 65 20 |. An I/O| device |
|00001510| 63 61 6e 20 74 72 61 6e | 73 66 65 72 20 69 6e 66 |can tran|sfer inf|
|00001520| 6f 72 6d 61 74 69 6f 6e | 20 69 6e 20 65 69 74 68 |ormation| in eith|
|00001530| 65 72 20 64 69 72 65 63 | 74 69 6f 6e 2e 0d 44 65 |er direc|tion..De|
|00001540| 76 69 63 65 73 20 74 72 | 61 6e 73 66 65 72 20 69 |vices tr|ansfer i|
|00001550| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 6e 20 6f 6e |nformati|on in on|
|00001560| 65 20 6f 66 20 74 77 6f | 20 77 61 79 73 2e 20 43 |e of two| ways. C|
|00001570| 68 61 72 61 63 74 65 72 | 20 64 65 76 69 63 65 73 |haracter| devices|
|00001580| 20 72 65 61 64 20 6f 72 | 20 77 72 69 74 65 20 61 | read or| write a|
|00001590| 20 73 74 72 65 61 6d 20 | 6f 66 20 63 68 61 72 61 | stream |of chara|
|000015a0| 63 74 65 72 73 2c 20 6f | 72 20 62 79 74 65 73 2c |cters, o|r bytes,|
|000015b0| 20 6f 6e 65 20 61 74 20 | 61 20 74 69 6d 65 3b 20 | one at |a time; |
|000015c0| 74 68 65 79 20 63 61 6e | 20 6e 65 69 74 68 65 72 |they can| neither|
|000015d0| 20 73 6b 69 70 20 62 79 | 74 65 73 20 6e 6f 72 20 | skip by|tes nor |
|000015e0| 67 6f 20 62 61 63 6b 20 | 74 6f 20 70 72 65 76 69 |go back |to previ|
|000015f0| 6f 75 73 20 62 79 74 65 | 73 2e 20 54 68 65 20 73 |ous byte|s. The s|
|00001600| 65 72 69 61 6c 20 70 6f | 72 74 73 20 61 6e 64 20 |erial po|rts and |
|00001610| 70 72 69 6e 74 65 72 73 | 20 61 72 65 20 63 68 61 |printers| are cha|
|00001620| 72 61 63 74 65 72 20 64 | 65 76 69 63 65 73 2e 0d |racter d|evices..|
|00001630| 42 6c 6f 63 6b 20 64 65 | 76 69 63 65 73 20 72 65 |Block de|vices re|
|00001640| 61 64 20 61 6e 64 20 77 | 72 69 74 65 20 65 6e 74 |ad and w|rite ent|
|00001650| 69 72 65 20 62 6c 6f 63 | 6b 73 20 6f 66 20 62 79 |ire bloc|ks of by|
|00001660| 74 65 73 20 61 74 20 6f | 6e 65 20 74 69 6d 65 3b |tes at o|ne time;|
|00001670| 20 74 68 65 79 20 63 61 | 6e 20 72 65 61 64 20 6f | they ca|n read o|
|00001680| 72 20 77 72 69 74 65 20 | 61 6e 79 20 61 63 63 65 |r write |any acce|
|00001690| 73 73 69 62 6c 65 20 62 | 6c 6f 63 6b 20 6f 6e 20 |ssible b|lock on |
|000016a0| 64 65 6d 61 6e 64 2e 20 | 54 68 65 73 65 20 64 65 |demand. |These de|
|000016b0| 76 69 63 65 73 20 61 72 | 65 20 75 73 75 61 6c 6c |vices ar|e usuall|
|000016c0| 79 20 75 73 65 64 20 74 | 6f 20 73 74 6f 72 65 20 |y used t|o store |
|000016d0| 61 6e 64 20 72 65 74 72 | 69 65 76 65 20 69 6e 66 |and retr|ieve inf|
|000016e0| 6f 72 6d 61 74 69 6f 6e | 2e 20 44 69 73 6b 20 64 |ormation|. Disk d|
|000016f0| 72 69 76 65 73 20 61 72 | 65 20 62 6c 6f 63 6b 20 |rives ar|e block |
|00001700| 64 65 76 69 63 65 73 2e | 0d 44 65 76 69 63 65 73 |devices.|.Devices|
|00001710| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 65 20 77 69 74 | communi|cate wit|
|00001720| 68 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 61 |h applic|ations a|
|00001730| 6e 64 20 77 69 74 68 20 | 74 68 65 20 4f 70 65 72 |nd with |the Oper|
|00001740| 61 74 69 6e 67 20 53 79 | 73 74 65 6d 20 74 68 72 |ating Sy|stem thr|
|00001750| 6f 75 67 68 20 73 70 65 | 63 69 61 6c 20 70 72 6f |ough spe|cial pro|
|00001760| 67 72 61 6d 73 20 63 61 | 6c 6c 65 64 20 64 65 76 |grams ca|lled dev|
|00001770| 69 63 65 20 64 72 69 76 | 65 72 73 2e 20 54 68 65 |ice driv|ers. The|
|00001780| 73 65 20 64 72 69 76 65 | 72 73 20 61 63 74 20 61 |se drive|rs act a|
|00001790| 73 20 74 72 61 6e 73 6c | 61 74 6f 72 73 2c 20 63 |s transl|ators, c|
|000017a0| 6f 6e 76 65 72 74 69 6e | 67 20 73 6f 66 74 77 61 |onvertin|g softwa|
|000017b0| 72 65 20 72 65 71 75 65 | 73 74 73 20 69 6e 74 6f |re reque|sts into|
|000017c0| 20 68 61 72 64 77 61 72 | 65 20 61 63 74 69 6f 6e | hardwar|e action|
|000017d0| 73 20 61 6e 64 20 68 61 | 72 64 77 61 72 65 20 61 |s and ha|rdware a|
|000017e0| 63 74 69 6f 6e 73 20 69 | 6e 74 6f 20 73 6f 66 74 |ctions i|nto soft|
|000017f0| 77 61 72 65 20 72 65 73 | 75 6c 74 73 2e 20 41 20 |ware res|ults. A |
|00001800| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 64 65 76 69 |synchron|ous devi|
|00001810| 63 65 20 64 72 69 76 65 | 72 20 63 6f 6d 70 6c 65 |ce drive|r comple|
|00001820| 74 65 73 20 65 61 63 68 | 20 63 6f 6d 6d 75 6e 69 |tes each| communi|
|00001830| 63 61 74 69 6f 6e 20 72 | 65 71 75 65 73 74 20 62 |cation r|equest b|
|00001840| 65 66 6f 72 65 20 72 65 | 74 75 72 6e 69 6e 67 20 |efore re|turning |
|00001850| 63 6f 6e 74 72 6f 6c 20 | 74 6f 20 74 68 65 20 73 |control |to the s|
|00001860| 79 73 74 65 6d 2e 20 41 | 6e 20 61 73 79 6e 63 68 |ystem. A|n asynch|
|00001870| 72 6f 6e 6f 75 73 20 64 | 65 76 69 63 65 20 64 72 |ronous d|evice dr|
|00001880| 69 76 65 72 20 63 61 6e | 20 69 6e 69 74 69 61 74 |iver can| initiat|
|00001890| 65 20 61 20 64 61 74 61 | 20 74 72 61 6e 73 66 65 |e a data| transfe|
|000018a0| 72 20 61 6e 64 20 72 65 | 74 75 72 6e 20 63 6f 6e |r and re|turn con|
|000018b0| 74 72 6f 6c 20 74 6f 20 | 74 68 65 20 73 79 73 74 |trol to |the syst|
|000018c0| 65 6d 20 62 65 66 6f 72 | 65 20 74 68 65 20 65 6e |em befor|e the en|
|000018d0| 74 69 72 65 20 74 72 61 | 6e 73 66 65 72 20 69 73 |tire tra|nsfer is|
|000018e0| 20 63 6f 6d 70 6c 65 74 | 65 2e 20 54 68 69 73 20 | complet|e. This |
|000018f0| 74 79 70 65 20 6f 66 20 | 64 65 76 69 63 65 20 64 |type of |device d|
|00001900| 72 69 76 65 72 20 75 73 | 75 61 6c 6c 79 20 72 65 |river us|ually re|
|00001910| 6c 69 65 73 20 6f 6e 20 | 69 6e 74 65 72 72 75 70 |lies on |interrup|
|00001920| 74 73 20 66 72 6f 6d 20 | 69 74 73 20 68 61 72 64 |ts from |its hard|
|00001930| 77 61 72 65 20 64 65 76 | 69 63 65 20 74 6f 20 72 |ware dev|ice to r|
|00001940| 65 67 61 69 6e 20 63 6f | 6e 74 72 6f 6c 20 6f 66 |egain co|ntrol of|
|00001950| 20 74 68 65 20 70 72 6f | 63 65 73 73 6f 72 20 61 | the pro|cessor a|
|00001960| 6e 64 20 63 6f 6e 74 69 | 6e 75 65 20 6f 72 20 63 |nd conti|nue or c|
|00001970| 6f 6d 70 6c 65 74 65 20 | 74 68 65 20 64 61 74 61 |omplete |the data|
|00001980| 20 74 72 61 6e 73 66 65 | 72 2e 0d 41 20 64 65 76 | transfe|r..A dev|
|00001990| 69 63 65 20 64 72 69 76 | 65 72 20 64 6f 65 73 20 |ice driv|er does |
|000019a0| 6e 6f 74 20 68 61 76 65 | 20 74 6f 20 62 65 20 61 |not have| to be a|
|000019b0| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 61 |ssociate|d with a|
|000019c0| 20 64 65 76 69 63 65 2e | 20 49 6e 20 67 65 6e 65 | device.| In gene|
|000019d0| 72 61 6c 2c 20 61 20 64 | 65 76 69 63 65 20 64 72 |ral, a d|evice dr|
|000019e0| 69 76 65 72 20 69 73 20 | 61 20 70 72 6f 67 72 61 |iver is |a progra|
|000019f0| 6d 20 74 68 61 74 20 63 | 6f 6e 66 6f 72 6d 73 20 |m that c|onforms |
|00001a00| 74 6f 20 61 20 70 72 65 | 64 65 66 69 6e 65 64 20 |to a pre|defined |
|00001a10| 66 6f 72 6d 61 74 20 61 | 6e 64 20 70 72 6f 67 72 |format a|nd progr|
|00001a20| 61 6d 6d 69 6e 67 20 69 | 6e 74 65 72 66 61 63 65 |amming i|nterface|
|00001a30| 2e 20 4d 61 6e 79 20 64 | 65 76 69 63 65 20 64 72 |. Many d|evice dr|
|00001a40| 69 76 65 72 73 20 74 61 | 6b 65 20 61 64 76 61 6e |ivers ta|ke advan|
|00001a50| 74 61 67 65 20 6f 66 20 | 74 68 69 73 20 70 72 65 |tage of |this pre|
|00001a60| 64 65 66 69 6e 65 64 20 | 69 6e 74 65 72 66 61 63 |defined |interfac|
|00001a70| 65 20 74 6f 20 70 65 72 | 66 6f 72 6d 20 74 61 73 |e to per|form tas|
|00001a80| 6b 73 20 75 6e 72 65 6c | 61 74 65 64 20 74 6f 20 |ks unrel|ated to |
|00001a90| 61 63 74 75 61 6c 20 70 | 68 79 73 69 63 61 6c 20 |actual p|hysical |
|00001aa0| 64 65 76 69 63 65 73 2e | 20 44 65 73 6b 20 61 63 |devices.| Desk ac|
|00001ab0| 63 65 73 73 6f 72 69 65 | 73 20 61 72 65 20 61 6e |cessorie|s are an|
|00001ac0| 20 65 78 61 6d 70 6c 65 | 20 6f 66 20 74 68 69 73 | example| of this|
|00001ad0| 20 6b 69 6e 64 20 6f 66 | 20 64 65 76 69 63 65 20 | kind of| device |
|00001ae0| 64 72 69 76 65 72 2e 0d | 53 6f 6d 65 20 64 65 76 |driver..|Some dev|
|00001af0| 69 63 65 20 64 72 69 76 | 65 72 73 20 61 72 65 20 |ice driv|ers are |
|00001b00| 73 74 6f 72 65 64 20 69 | 6e 20 74 68 65 20 4d 61 |stored i|n the Ma|
|00001b10| 63 69 6e 74 6f 73 68 20 | 52 4f 4d 3b 20 6f 74 68 |cintosh |ROM; oth|
|00001b20| 65 72 73 20 61 72 65 20 | 73 74 6f 72 65 64 20 69 |ers are |stored i|
|00001b30| 6e 20 64 72 69 76 65 72 | 20 28 27 44 52 56 52 27 |n driver| ('DRVR'|
|00001b40| 29 20 72 65 73 6f 75 72 | 63 65 73 2c 20 77 68 69 |) resour|ces, whi|
|00001b50| 63 68 20 61 72 65 20 74 | 79 70 69 63 61 6c 6c 79 |ch are t|ypically|
|00001b60| 20 6c 6f 63 61 74 65 64 | 20 69 6e 20 61 70 70 6c | located| in appl|
|00001b70| 69 63 61 74 69 6f 6e 73 | 2c 20 73 79 73 74 65 6d |ications|, system|
|00001b80| 20 65 78 74 65 6e 73 69 | 6f 6e 20 66 69 6c 65 73 | extensi|on files|
|00001b90| 2c 20 61 6e 64 20 74 68 | 65 20 66 69 72 6d 77 61 |, and th|e firmwa|
|00001ba0| 72 65 20 6f 66 20 65 78 | 70 61 6e 73 69 6f 6e 20 |re of ex|pansion |
|00001bb0| 63 61 72 64 73 2e 20 41 | 20 64 72 69 76 65 72 20 |cards. A| driver |
|00001bc0| 72 65 73 6f 75 72 63 65 | 20 63 6f 6e 74 61 69 6e |resource| contain|
|00001bd0| 73 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |s inform|ation ab|
|00001be0| 6f 75 74 20 74 68 65 20 | 64 72 69 76 65 72 2c 20 |out the |driver, |
|00001bf0| 69 6e 63 6c 75 64 69 6e | 67 20 74 68 65 20 64 72 |includin|g the dr|
|00001c00| 69 76 65 72 20 6e 61 6d | 65 2c 20 61 6e 64 20 74 |iver nam|e, and t|
|00001c10| 68 65 20 63 6f 64 65 20 | 6e 65 63 65 73 73 61 72 |he code |necessar|
|00001c20| 79 20 66 6f 72 20 74 68 | 65 20 64 72 69 76 65 72 |y for th|e driver|
|00001c30| 20 74 6f 20 70 65 72 66 | 6f 72 6d 20 69 74 73 20 | to perf|orm its |
|00001c40| 66 75 6e 63 74 69 6f 6e | 73 2e 20 54 68 65 20 44 |function|s. The D|
|00001c50| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 6d 75 |evice Ma|nager mu|
|00001c60| 73 74 20 6c 6f 61 64 20 | 61 20 64 72 69 76 65 72 |st load |a driver|
|00001c70| 20 66 72 6f 6d 20 69 74 | 73 20 64 72 69 76 65 72 | from it|s driver|
|00001c80| 20 72 65 73 6f 75 72 63 | 65 20 69 6e 74 6f 20 6d | resourc|e into m|
|00001c90| 65 6d 6f 72 79 20 62 65 | 66 6f 72 65 20 79 6f 75 |emory be|fore you|
|00001ca0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 6f 72 |r applic|ation or|
|00001cb0| 20 61 6e 79 20 70 61 72 | 74 20 6f 66 20 74 68 65 | any par|t of the|
|00001cc0| 20 73 79 73 74 65 6d 20 | 63 61 6e 20 63 6f 6d 6d | system |can comm|
|00001cd0| 75 6e 69 63 61 74 65 20 | 77 69 74 68 20 69 74 2e |unicate |with it.|
|00001ce0| 0d 54 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 |.The Dev|ice Mana|
|00001cf0| 67 65 72 20 6f 70 65 6e | 73 20 63 65 72 74 61 69 |ger open|s certai|
|00001d00| 6e 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 73 |n device| drivers|
|00001d10| 20 61 74 20 73 79 73 74 | 65 6d 20 73 74 61 72 74 | at syst|em start|
|00001d20| 75 70 20 74 69 6d 65 2e | 20 54 68 65 73 65 20 64 |up time.| These d|
|00001d30| 72 69 76 65 72 73 20 6d | 61 6b 65 20 75 70 20 74 |rivers m|ake up t|
|00001d40| 68 65 20 73 74 61 6e 64 | 61 72 64 20 64 65 76 69 |he stand|ard devi|
|00001d50| 63 65 20 64 72 69 76 65 | 72 73 2c 20 77 68 69 63 |ce drive|rs, whic|
|00001d60| 68 20 69 6e 63 6c 75 64 | 65 20 74 68 65 20 44 69 |h includ|e the Di|
|00001d70| 73 6b 20 44 72 69 76 65 | 72 2c 20 74 68 65 20 53 |sk Drive|r, the S|
|00001d80| 65 72 69 61 6c 20 44 72 | 69 76 65 72 73 2c 20 61 |erial Dr|ivers, a|
|00001d90| 6e 64 20 70 72 69 6e 74 | 65 72 20 64 72 69 76 65 |nd print|er drive|
|00001da0| 72 73 2e 20 54 68 65 20 | 44 65 76 69 63 65 20 4d |rs. The |Device M|
|00001db0| 61 6e 61 67 65 72 20 6f | 70 65 6e 73 20 6f 74 68 |anager o|pens oth|
|00001dc0| 65 72 20 64 72 69 76 65 | 72 73 20 77 68 65 6e 20 |er drive|rs when |
|00001dd0| 72 65 71 75 65 73 74 65 | 64 d1 74 79 70 69 63 61 |requeste|d.typica|
|00001de0| 6c 6c 79 20 62 79 20 69 | 6e 69 74 69 61 6c 69 7a |lly by i|nitializ|
|00001df0| 61 74 69 6f 6e 20 28 27 | 49 4e 49 54 27 29 20 72 |ation ('|INIT') r|
|00001e00| 65 73 6f 75 72 63 65 73 | 2c 20 61 70 70 6c 69 63 |esources|, applic|
|00001e10| 61 74 69 6f 6e 73 2c 20 | 61 6e 64 20 6f 74 68 65 |ations, |and othe|
|00001e20| 72 20 64 72 69 76 65 72 | 73 2e 0d 41 62 6f 75 74 |r driver|s..About|
|00001e30| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00001e40| 67 65 72 0d 54 68 65 20 | 44 65 76 69 63 65 20 4d |ger.The |Device M|
|00001e50| 61 6e 61 67 65 72 20 70 | 72 6f 76 69 64 65 73 20 |anager p|rovides |
|00001e60| 74 68 72 65 65 20 62 61 | 73 69 63 20 73 65 72 76 |three ba|sic serv|
|00001e70| 69 63 65 73 3a 0d 6e 09 | 49 74 20 70 72 6f 76 69 |ices:.n.|It provi|
|00001e80| 64 65 73 20 61 20 63 6f | 6d 6d 6f 6e 20 70 72 6f |des a co|mmon pro|
|00001e90| 67 72 61 6d 6d 69 6e 67 | 20 69 6e 74 65 72 66 61 |gramming| interfa|
|00001ea0| 63 65 20 66 6f 72 20 61 | 70 70 6c 69 63 61 74 69 |ce for a|pplicati|
|00001eb0| 6f 6e 73 20 61 6e 64 20 | 6f 74 68 65 72 20 6d 61 |ons and |other ma|
|00001ec0| 6e 61 67 65 72 73 20 74 | 6f 20 75 73 65 20 77 68 |nagers t|o use wh|
|00001ed0| 65 6e 20 63 6f 6d 6d 75 | 6e 69 63 61 74 69 6e 67 |en commu|nicating|
|00001ee0| 20 77 69 74 68 20 64 65 | 76 69 63 65 20 64 72 69 | with de|vice dri|
|00001ef0| 76 65 72 73 2e 0d 6e 09 | 49 74 20 6d 61 69 6e 74 |vers..n.|It maint|
|00001f00| 61 69 6e 73 20 64 61 74 | 61 20 73 74 72 75 63 74 |ains dat|a struct|
|00001f10| 75 72 65 73 20 74 6f 20 | 6d 61 6e 61 67 65 20 6f |ures to |manage o|
|00001f20| 70 65 6e 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |pen devi|ce drive|
|00001f30| 72 73 2e 0d 6e 09 49 74 | 20 70 72 6f 76 69 64 65 |rs..n.It| provide|
|00001f40| 73 20 73 75 70 70 6f 72 | 74 20 72 6f 75 74 69 6e |s suppor|t routin|
|00001f50| 65 73 20 75 73 65 66 75 | 6c 20 77 68 65 6e 20 77 |es usefu|l when w|
|00001f60| 72 69 74 69 6e 67 20 79 | 6f 75 72 20 6f 77 6e 20 |riting y|our own |
|00001f70| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 73 2e 0d |device d|rivers..|
|00001f80| 54 79 70 69 63 61 6c 6c | 79 2c 20 79 6f 75 72 20 |Typicall|y, your |
|00001f90| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 77 6f 6e d5 |applicat|ion won.|
|00001fa0| 74 20 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 64 69 |t commun|icate di|
|00001fb0| 72 65 63 74 6c 79 20 77 | 69 74 68 20 64 65 76 69 |rectly w|ith devi|
|00001fc0| 63 65 20 64 72 69 76 65 | 72 73 3b 20 69 6e 73 74 |ce drive|rs; inst|
|00001fd0| 65 61 64 2c 20 69 74 20 | 77 69 6c 6c 20 63 61 6c |ead, it |will cal|
|00001fe0| 6c 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |l Device| Manager|
|00001ff0| 20 72 6f 75 74 69 6e 65 | 73 20 6f 72 20 63 61 6c | routine|s or cal|
|00002000| 6c 20 74 68 65 20 72 6f | 75 74 69 6e 65 73 20 6f |l the ro|utines o|
|00002010| 66 20 61 6e 6f 74 68 65 | 72 20 6d 61 6e 61 67 65 |f anothe|r manage|
|00002020| 72 20 74 68 61 74 20 63 | 61 6c 6c 73 20 74 68 65 |r that c|alls the|
|00002030| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 2e | Device |Manager.|
|00002040| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 79 6f | For exa|mple, yo|
|00002050| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 63 |ur appli|cation c|
|00002060| 61 6e 20 63 6f 6d 6d 75 | 6e 69 63 61 74 65 20 77 |an commu|nicate w|
|00002070| 69 74 68 20 61 20 64 69 | 73 6b 20 64 72 69 76 65 |ith a di|sk drive|
|00002080| 72 20 62 79 20 63 61 6c | 6c 69 6e 67 20 74 68 65 |r by cal|ling the|
|00002090| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|000020a0| 64 69 72 65 63 74 6c 79 | 20 6f 72 20 62 79 20 63 |directly| or by c|
|000020b0| 61 6c 6c 69 6e 67 20 74 | 68 65 20 46 69 6c 65 20 |alling t|he File |
|000020c0| 4d 61 6e 61 67 65 72 2c | 20 77 68 69 63 68 20 63 |Manager,| which c|
|000020d0| 61 6c 6c 73 20 74 68 65 | 20 44 65 76 69 63 65 20 |alls the| Device |
|000020e0| 4d 61 6e 61 67 65 72 2e | 0d 46 69 67 75 72 65 20 |Manager.|.Figure |
|000020f0| 31 2d 31 20 73 68 6f 77 | 73 20 74 68 65 20 72 65 |1-1 show|s the re|
|00002100| 6c 61 74 69 6f 6e 73 68 | 69 70 20 62 65 74 77 65 |lationsh|ip betwe|
|00002110| 65 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 2c |en appli|cations,|
|00002120| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00002130| 67 65 72 2c 20 6f 74 68 | 65 72 20 6d 61 6e 61 67 |ger, oth|er manag|
|00002140| 65 72 73 2c 20 64 65 76 | 69 63 65 20 64 72 69 76 |ers, dev|ice driv|
|00002150| 65 72 73 2c 20 61 6e 64 | 20 64 65 76 69 63 65 73 |ers, and| devices|
|00002160| 2e 0d 43 6f 6d 6d 75 6e | 69 63 61 74 69 6f 6e 20 |..Commun|ication |
|00002170| 77 69 74 68 20 44 65 76 | 69 63 65 73 0d 42 65 66 |with Dev|ices.Bef|
|00002180| 6f 72 65 20 74 68 65 20 | 44 65 76 69 63 65 20 4d |ore the |Device M|
|00002190| 61 6e 61 67 65 72 20 61 | 6c 6c 6f 77 73 20 61 6e |anager a|llows an|
|000021a0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 6f 72 20 | applica|tion or |
|000021b0| 61 6e 6f 74 68 65 72 20 | 6d 61 6e 61 67 65 72 20 |another |manager |
|000021c0| 74 6f 20 63 6f 6d 6d 75 | 6e 69 63 61 74 65 20 77 |to commu|nicate w|
|000021d0| 69 74 68 20 61 20 64 65 | 76 69 63 65 20 64 72 69 |ith a de|vice dri|
|000021e0| 76 65 72 2c 20 74 68 65 | 20 64 72 69 76 65 72 20 |ver, the| driver |
|000021f0| 6d 75 73 74 20 62 65 20 | 6f 70 65 6e 2c 20 77 68 |must be |open, wh|
|00002200| 69 63 68 20 6d 65 61 6e | 73 20 74 68 65 20 44 65 |ich mean|s the De|
|00002210| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 68 61 73 |vice Man|ager has|
|00002220| 20 72 65 63 65 69 76 65 | 64 20 61 20 72 65 71 75 | receive|d a requ|
|00002230| 65 73 74 20 74 6f 20 6f | 70 65 6e 20 74 68 65 20 |est to o|pen the |
|00002240| 64 72 69 76 65 72 2c 20 | 68 61 73 20 6c 6f 61 64 |driver, |has load|
|00002250| 65 64 20 74 68 65 20 64 | 72 69 76 65 72 20 69 6e |ed the d|river in|
|00002260| 74 6f 20 6d 65 6d 6f 72 | 79 20 69 66 20 6e 65 63 |to memor|y if nec|
|00002270| 65 73 73 61 72 79 2c 20 | 61 6e 64 20 68 61 73 20 |essary, |and has |
|00002280| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 63 61 6c |successf|ully cal|
|00002290| 6c 65 64 20 74 68 65 20 | 64 72 69 76 65 72 d5 73 |led the |driver.s|
|000022a0| 20 6f 70 65 6e 69 6e 67 | 20 72 6f 75 74 69 6e 65 | opening| routine|
|000022b0| 2e 0d 57 68 65 6e 20 6f | 70 65 6e 69 6e 67 20 61 |..When o|pening a|
|000022c0| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 2c 20 | device |driver, |
|000022d0| 74 68 65 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |the Devi|ce Manag|
|000022e0| 65 72 20 63 72 65 61 74 | 65 73 20 61 20 64 65 76 |er creat|es a dev|
|000022f0| 69 63 65 20 63 6f 6e 74 | 72 6f 6c 20 65 6e 74 72 |ice cont|rol entr|
|00002300| 79 20 28 44 43 45 29 2c | 20 77 68 69 63 68 20 63 |y (DCE),| which c|
|00002310| 6f 6e 74 61 69 6e 73 20 | 69 6e 66 6f 72 6d 61 74 |ontains |informat|
|00002320| 69 6f 6e 20 61 62 6f 75 | 74 20 74 68 65 20 64 65 |ion abou|t the de|
|00002330| 76 69 63 65 20 64 72 69 | 76 65 72 2e 20 46 6f 72 |vice dri|ver. For|
|00002340| 20 65 78 61 6d 70 6c 65 | 2c 20 74 68 65 20 64 65 | example|, the de|
|00002350| 76 69 63 65 20 63 6f 6e | 74 72 6f 6c 20 65 6e 74 |vice con|trol ent|
|00002360| 72 79 20 63 6f 6e 74 61 | 69 6e 73 20 61 20 68 61 |ry conta|ins a ha|
|00002370| 6e 64 6c 65 20 74 6f 20 | 74 68 65 20 64 65 76 69 |ndle to |the devi|
|00002380| 63 65 20 64 72 69 76 65 | 72 20 63 6f 64 65 20 28 |ce drive|r code (|
|00002390| 6f 72 20 61 20 70 6f 69 | 6e 74 65 72 20 66 6f 72 |or a poi|nter for|
|000023a0| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 73 20 | device |drivers |
|000023b0| 69 6e 20 52 4f 4d 29 2e | 20 54 79 70 69 63 61 6c |in ROM).| Typical|
|000023c0| 6c 79 2c 20 74 68 65 20 | 44 65 76 69 63 65 20 4d |ly, the |Device M|
|000023d0| 61 6e 61 67 65 72 20 6d | 61 69 6e 74 61 69 6e 73 |anager m|aintains|
|000023e0| 20 6f 6e 65 20 64 65 76 | 69 63 65 20 63 6f 6e 74 | one dev|ice cont|
|000023f0| 72 6f 6c 20 65 6e 74 72 | 79 20 66 6f 72 20 65 61 |rol entr|y for ea|
|00002400| 63 68 20 6f 70 65 6e 20 | 64 65 76 69 63 65 20 64 |ch open |device d|
|00002410| 72 69 76 65 72 2c 20 62 | 75 74 20 69 74 20 69 73 |river, b|ut it is|
|00002420| 20 70 6f 73 73 69 62 6c | 65 20 66 6f 72 20 6d 75 | possibl|e for mu|
|00002430| 6c 74 69 70 6c 65 20 65 | 6e 74 72 69 65 73 20 74 |ltiple e|ntries t|
|00002440| 6f 20 72 65 66 65 72 20 | 74 6f 20 74 68 65 20 73 |o refer |to the s|
|00002450| 61 6d 65 20 64 72 69 76 | 65 72 2e 0d 54 68 65 20 |ame driv|er..The |
|00002460| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 6d |Device M|anager m|
|00002470| 61 69 6e 74 61 69 6e 73 | 20 61 6e 6f 74 68 65 72 |aintains| another|
|00002480| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 2c | data st|ructure,|
|00002490| 20 74 68 65 20 75 6e 69 | 74 20 74 61 62 6c 65 2c | the uni|t table,|
|000024a0| 20 74 6f 20 6f 72 67 61 | 6e 69 7a 65 20 74 68 65 | to orga|nize the|
|000024b0| 20 64 65 76 69 63 65 20 | 63 6f 6e 74 72 6f 6c 20 | device |control |
|000024c0| 65 6e 74 72 69 65 73 2e | 20 54 68 65 20 75 6e 69 |entries.| The uni|
|000024d0| 74 20 74 61 62 6c 65 20 | 63 6f 6e 74 61 69 6e 73 |t table |contains|
|000024e0| 20 61 20 68 61 6e 64 6c | 65 20 74 6f 20 74 68 65 | a handl|e to the|
|000024f0| 20 64 65 76 69 63 65 20 | 63 6f 6e 74 72 6f 6c 20 | device |control |
|00002500| 65 6e 74 72 79 20 66 6f | 72 20 65 61 63 68 20 6f |entry fo|r each o|
|00002510| 70 65 6e 20 64 72 69 76 | 65 72 2e 20 54 68 65 20 |pen driv|er. The |
|00002520| 6c 6f 63 61 74 69 6f 6e | 20 6f 66 20 61 20 64 72 |location| of a dr|
|00002530| 69 76 65 72 d5 73 20 64 | 65 76 69 63 65 20 63 6f |iver.s d|evice co|
|00002540| 6e 74 72 6f 6c 20 65 6e | 74 72 79 20 69 6e 20 74 |ntrol en|try in t|
|00002550| 68 65 20 75 6e 69 74 20 | 74 61 62 6c 65 20 69 73 |he unit |table is|
|00002560| 20 63 61 6c 6c 65 64 20 | 74 68 65 20 64 72 69 76 | called |the driv|
|00002570| 65 72 d5 73 20 75 6e 69 | 74 20 6e 75 6d 62 65 72 |er.s uni|t number|
|00002580| 2e 20 0d 57 68 65 6e 20 | 79 6f 75 20 6f 70 65 6e |. .When |you open|
|00002590| 20 61 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 | a devic|e driver|
|000025a0| 2c 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |, the De|vice Man|
|000025b0| 61 67 65 72 20 72 65 74 | 75 72 6e 73 20 61 20 64 |ager ret|urns a d|
|000025c0| 72 69 76 65 72 20 72 65 | 66 65 72 65 6e 63 65 20 |river re|ference |
|000025d0| 6e 75 6d 62 65 72 20 66 | 6f 72 20 74 68 65 20 64 |number f|or the d|
|000025e0| 72 69 76 65 72 2e 20 59 | 6f 75 20 75 73 65 20 74 |river. Y|ou use t|
|000025f0| 68 65 20 64 72 69 76 65 | 72 20 72 65 66 65 72 65 |he drive|r refere|
|00002600| 6e 63 65 20 6e 75 6d 62 | 65 72 2c 20 69 6e 73 74 |nce numb|er, inst|
|00002610| 65 61 64 20 6f 66 20 74 | 68 65 20 64 72 69 76 65 |ead of t|he drive|
|00002620| 72 20 6e 61 6d 65 2c 20 | 74 6f 20 69 64 65 6e 74 |r name, |to ident|
|00002630| 69 66 79 20 74 68 65 20 | 64 72 69 76 65 72 20 69 |ify the |driver i|
|00002640| 6e 20 73 75 62 73 65 71 | 75 65 6e 74 20 63 6f 6d |n subseq|uent com|
|00002650| 6d 75 6e 69 63 61 74 69 | 6f 6e 20 72 65 71 75 65 |municati|on reque|
|00002660| 73 74 73 2e 20 54 68 65 | 20 64 72 69 76 65 72 20 |sts. The| driver |
|00002670| 72 65 66 65 72 65 6e 63 | 65 20 6e 75 6d 62 65 72 |referenc|e number|
|00002680| 20 69 73 20 72 65 6c 61 | 74 65 64 20 74 6f 20 74 | is rela|ted to t|
|00002690| 68 65 20 75 6e 69 74 20 | 6e 75 6d 62 65 72 20 62 |he unit |number b|
|000026a0| 79 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |y the fo|llowing |
|000026b0| 66 6f 72 6d 75 6c 61 3a | 0d 54 68 65 20 44 65 76 |formula:|.The Dev|
|000026c0| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 61 6c 73 6f |ice Mana|ger also|
|000026d0| 20 6d 61 69 6e 74 61 69 | 6e 73 20 61 20 64 72 69 | maintai|ns a dri|
|000026e0| 76 65 72 20 72 65 71 75 | 65 73 74 20 71 75 65 75 |ver requ|est queu|
|000026f0| 65 20 66 6f 72 20 65 61 | 63 68 20 6f 70 65 6e 20 |e for ea|ch open |
|00002700| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 2e 20 41 |device d|river. A|
|00002710| 74 20 74 68 65 20 68 65 | 61 64 20 6f 66 20 74 68 |t the he|ad of th|
|00002720| 69 73 20 71 75 65 75 65 | 20 69 73 20 74 68 65 20 |is queue| is the |
|00002730| 49 2f 4f 20 72 65 71 75 | 65 73 74 20 63 75 72 72 |I/O requ|est curr|
|00002740| 65 6e 74 6c 79 20 62 65 | 69 6e 67 20 70 72 6f 63 |ently be|ing proc|
|00002750| 65 73 73 65 64 20 62 79 | 20 74 68 65 20 64 65 76 |essed by| the dev|
|00002760| 69 63 65 20 64 72 69 76 | 65 72 2e 20 54 68 65 20 |ice driv|er. The |
|00002770| 72 65 73 74 20 6f 66 20 | 74 68 65 20 71 75 65 75 |rest of |the queu|
|00002780| 65 20 63 6f 6e 74 61 69 | 6e 73 20 70 65 6e 64 69 |e contai|ns pendi|
|00002790| 6e 67 20 49 2f 4f 20 72 | 65 71 75 65 73 74 73 d1 |ng I/O r|equests.|
|000027a0| 72 65 71 75 65 73 74 73 | 20 74 68 65 20 44 65 76 |requests| the Dev|
|000027b0| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 68 61 73 20 |ice Mana|ger has |
|000027c0| 72 65 63 65 69 76 65 64 | 20 62 75 74 20 6e 6f 74 |received| but not|
|000027d0| 20 79 65 74 20 73 65 6e | 74 20 74 6f 20 74 68 65 | yet sen|t to the|
|000027e0| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 2e 20 | device |driver. |
|000027f0| 54 68 69 73 20 71 75 65 | 75 65 20 61 6c 6c 6f 77 |This que|ue allow|
|00002800| 73 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |s your a|pplicati|
|00002810| 6f 6e 20 74 6f 20 72 65 | 71 75 65 73 74 20 61 20 |on to re|quest a |
|00002820| 64 61 74 61 20 74 72 61 | 6e 73 66 65 72 20 77 69 |data tra|nsfer wi|
|00002830| 74 68 20 61 20 62 75 73 | 79 20 64 65 76 69 63 65 |th a bus|y device|
|00002840| 20 61 6e 64 20 61 63 63 | 6f 6d 70 6c 69 73 68 20 | and acc|omplish |
|00002850| 6f 74 68 65 72 20 74 61 | 73 6b 73 20 77 68 69 6c |other ta|sks whil|
|00002860| 65 20 74 68 65 20 64 65 | 76 69 63 65 20 73 61 74 |e the de|vice sat|
|00002870| 69 73 66 69 65 73 20 70 | 72 65 76 69 6f 75 73 20 |isfies p|revious |
|00002880| 72 65 71 75 65 73 74 73 | 2e 0d 57 69 74 68 20 72 |requests|..With r|
|00002890| 65 73 70 65 63 74 20 74 | 6f 20 74 68 65 20 64 72 |espect t|o the dr|
|000028a0| 69 76 65 72 20 72 65 71 | 75 65 73 74 20 71 75 65 |iver req|uest que|
|000028b0| 75 65 2c 20 74 68 65 20 | 44 65 76 69 63 65 20 4d |ue, the |Device M|
|000028c0| 61 6e 61 67 65 72 20 61 | 6c 6c 6f 77 73 20 79 6f |anager a|llows yo|
|000028d0| 75 20 6d 61 6b 65 20 74 | 6f 20 74 68 72 65 65 20 |u make t|o three |
|000028e0| 74 79 70 65 73 20 6f 66 | 20 72 65 71 75 65 73 74 |types of| request|
|000028f0| 73 3a 20 73 79 6e 63 68 | 72 6f 6e 6f 75 73 2c 20 |s: synch|ronous, |
|00002900| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 2c 20 61 6e |asynchro|nous, an|
|00002910| 64 20 69 6d 6d 65 64 69 | 61 74 65 2e 0d 54 68 65 |d immedi|ate..The|
|00002920| 20 74 65 72 6d 73 20 73 | 79 6e 63 68 72 6f 6e 6f | terms s|ynchrono|
|00002930| 75 73 20 61 6e 64 20 61 | 73 79 6e 63 68 72 6f 6e |us and a|synchron|
|00002940| 6f 75 73 20 68 61 76 65 | 20 64 69 66 66 65 72 65 |ous have| differe|
|00002950| 6e 74 20 6d 65 61 6e 69 | 6e 67 73 20 64 65 70 65 |nt meani|ngs depe|
|00002960| 6e 64 69 6e 67 20 6f 6e | 20 74 68 65 69 72 20 63 |nding on| their c|
|00002970| 6f 6e 74 65 78 74 2e 20 | 0d 57 68 65 6e 20 72 65 |ontext. |.When re|
|00002980| 66 65 72 72 69 6e 67 20 | 74 6f 20 61 20 64 65 76 |ferring |to a dev|
|00002990| 69 63 65 20 64 72 69 76 | 65 72 2c 20 74 68 65 20 |ice driv|er, the |
|000029a0| 74 65 72 6d 20 73 79 6e | 63 68 72 6f 6e 6f 75 73 |term syn|chronous|
|000029b0| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 61 74 20 | indicat|es that |
|000029c0| 74 68 65 20 64 72 69 76 | 65 72 20 63 6f 6d 70 6c |the driv|er compl|
|000029d0| 65 74 65 73 20 74 68 65 | 20 65 6e 74 69 72 65 20 |etes the| entire |
|000029e0| 72 65 71 75 65 73 74 20 | 62 65 66 6f 72 65 20 72 |request |before r|
|000029f0| 65 74 75 72 6e 69 6e 67 | 20 63 6f 6e 74 72 6f 6c |eturning| control|
|00002a00| 20 74 6f 20 74 68 65 20 | 44 65 76 69 63 65 20 4d | to the |Device M|
|00002a10| 61 6e 61 67 65 72 2e 20 | 54 68 65 20 74 65 72 6d |anager. |The term|
|00002a20| 20 61 73 79 6e 63 68 72 | 6f 6e 6f 75 73 20 69 6e | asynchr|onous in|
|00002a30| 64 69 63 61 74 65 73 20 | 74 68 61 74 20 74 68 65 |dicates |that the|
|00002a40| 20 64 72 69 76 65 72 20 | 63 61 6e 20 62 65 67 69 | driver |can begi|
|00002a50| 6e 20 70 72 6f 63 65 73 | 73 69 6e 67 20 61 20 72 |n proces|sing a r|
|00002a60| 65 71 75 65 73 74 20 61 | 6e 64 20 72 65 74 75 72 |equest a|nd retur|
|00002a70| 6e 20 63 6f 6e 74 72 6f | 6c 20 74 6f 20 74 68 65 |n contro|l to the|
|00002a80| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00002a90| 62 65 66 6f 72 65 20 74 | 68 65 20 72 65 71 75 65 |before t|he reque|
|00002aa0| 73 74 20 69 73 20 63 6f | 6d 70 6c 65 74 65 2e 20 |st is co|mplete. |
|00002ab0| 57 68 65 6e 20 61 20 64 | 72 69 76 65 72 20 69 73 |When a d|river is|
|00002ac0| 20 68 61 6e 64 6c 69 6e | 67 20 61 20 72 65 71 75 | handlin|g a requ|
|00002ad0| 65 73 74 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 |est asyn|chronous|
|00002ae0| 6c 79 2c 20 69 74 20 75 | 73 75 61 6c 6c 79 20 72 |ly, it u|sually r|
|00002af0| 65 6c 69 65 73 20 6f 6e | 20 69 6e 74 65 72 72 75 |elies on| interru|
|00002b00| 70 74 73 20 66 72 6f 6d | 20 74 68 65 20 68 61 72 |pts from| the har|
|00002b10| 64 77 61 72 65 20 64 65 | 76 69 63 65 20 74 6f 20 |dware de|vice to |
|00002b20| 63 6f 6e 74 69 6e 75 65 | 20 70 72 6f 63 65 73 73 |continue| process|
|00002b30| 69 6e 67 20 74 68 65 20 | 72 65 71 75 65 73 74 2e |ing the |request.|
|00002b40| 0d 57 68 65 6e 20 72 65 | 66 65 72 72 69 6e 67 20 |.When re|ferring |
|00002b50| 74 6f 20 72 65 71 75 65 | 73 74 73 2c 20 74 68 65 |to reque|sts, the|
|00002b60| 20 74 65 72 6d 73 20 73 | 79 6e 63 68 72 6f 6e 6f | terms s|ynchrono|
|00002b70| 75 73 20 61 6e 64 20 61 | 73 79 6e 63 68 72 6f 6e |us and a|synchron|
|00002b80| 6f 75 73 20 69 6e 64 69 | 63 61 74 65 20 68 6f 77 |ous indi|cate how|
|00002b90| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00002ba0| 67 65 72 20 70 72 6f 63 | 65 73 73 65 73 20 74 68 |ger proc|esses th|
|00002bb0| 65 20 72 65 71 75 65 73 | 74 2e 20 41 63 74 75 61 |e reques|t. Actua|
|00002bc0| 6c 6c 79 2c 20 79 6f 75 | 20 63 61 6e 20 73 70 65 |lly, you| can spe|
|00002bd0| 63 69 66 79 20 74 68 61 | 74 20 74 68 65 20 44 65 |cify tha|t the De|
|00002be0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 70 72 6f |vice Man|ager pro|
|00002bf0| 63 65 73 73 20 74 68 65 | 20 72 65 71 75 65 73 74 |cess the| request|
|00002c00| 20 69 6e 20 6f 6e 65 20 | 6f 66 20 74 68 72 65 65 | in one |of three|
|00002c10| 20 77 61 79 73 2e 0d 6e | 09 53 79 6e 63 68 72 6f | ways..n|.Synchro|
|00002c20| 6e 6f 75 73 20 72 65 71 | 75 65 73 74 73 2e 20 57 |nous req|uests. W|
|00002c30| 68 65 6e 20 79 6f 75 20 | 6d 61 6b 65 20 61 20 73 |hen you |make a s|
|00002c40| 79 6e 63 68 72 6f 6e 6f | 75 73 20 72 65 71 75 65 |ynchrono|us reque|
|00002c50| 73 74 2c 20 74 68 65 20 | 44 65 76 69 63 65 20 4d |st, the |Device M|
|00002c60| 61 6e 61 67 65 72 20 70 | 6c 61 63 65 73 20 79 6f |anager p|laces yo|
|00002c70| 75 72 20 72 65 71 75 65 | 73 74 20 61 74 20 74 68 |ur reque|st at th|
|00002c80| 65 20 65 6e 64 20 6f 66 | 20 74 68 65 20 64 72 69 |e end of| the dri|
|00002c90| 76 65 72 20 72 65 71 75 | 65 73 74 20 71 75 65 75 |ver requ|est queu|
|00002ca0| 65 2e 20 54 68 65 20 44 | 65 76 69 63 65 20 4d 61 |e. The D|evice Ma|
|00002cb0| 6e 61 67 65 72 20 74 68 | 65 6e 20 77 61 69 74 73 |nager th|en waits|
|00002cc0| 20 75 6e 74 69 6c 20 74 | 68 65 20 64 72 69 76 65 | until t|he drive|
|00002cd0| 72 20 68 61 73 20 68 61 | 6e 64 6c 65 64 20 65 76 |r has ha|ndled ev|
|00002ce0| 65 72 79 20 72 65 71 75 | 65 73 74 20 69 6e 20 74 |ery requ|est in t|
|00002cf0| 68 65 20 71 75 65 75 65 | 2c 20 69 6e 63 6c 75 64 |he queue|, includ|
|00002d00| 69 6e 67 20 74 68 65 20 | 73 79 6e 63 68 72 6f 6e |ing the |synchron|
|00002d10| 6f 75 73 20 6f 6e 65 2c | 20 62 65 66 6f 72 65 20 |ous one,| before |
|00002d20| 72 65 74 75 72 6e 69 6e | 67 20 63 6f 6e 74 72 6f |returnin|g contro|
|00002d30| 6c 20 74 6f 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |l to you|r applic|
|00002d40| 61 74 69 6f 6e 2e 20 4e | 6f 74 69 63 65 20 74 68 |ation. N|otice th|
|00002d50| 65 72 65 20 63 61 6e 20 | 6e 65 76 65 72 20 62 65 |ere can |never be|
|00002d60| 20 6d 6f 72 65 20 74 68 | 61 6e 20 6f 6e 65 20 73 | more th|an one s|
|00002d70| 79 6e 63 68 72 6f 6e 6f | 75 73 20 72 65 71 75 65 |ynchrono|us reque|
|00002d80| 73 74 20 70 65 72 20 64 | 72 69 76 65 72 20 72 65 |st per d|river re|
|00002d90| 71 75 65 73 74 20 71 75 | 65 75 65 20 61 74 20 61 |quest qu|eue at a|
|00002da0| 6e 79 20 67 69 76 65 6e | 20 74 69 6d 65 2e 20 28 |ny given| time. (|
|00002db0| 54 68 65 20 64 72 69 76 | 65 72 20 63 61 6e 20 68 |The driv|er can h|
|00002dc0| 61 6e 64 6c 65 20 65 61 | 63 68 20 72 65 71 75 65 |andle ea|ch reque|
|00002dd0| 73 74 20 69 6e 20 74 68 | 65 20 71 75 65 75 65 20 |st in th|e queue |
|00002de0| 73 79 6e 63 68 72 6f 6e | 6f 75 73 6c 79 20 6f 72 |synchron|ously or|
|00002df0| 20 61 73 79 6e 63 68 72 | 6f 6e 6f 75 73 6c 79 2c | asynchr|onously,|
|00002e00| 20 62 75 74 20 74 68 65 | 20 44 65 76 69 63 65 20 | but the| Device |
|00002e10| 4d 61 6e 61 67 65 72 20 | 64 6f 65 73 20 6e 6f 74 |Manager |does not|
|00002e20| 20 72 65 74 75 72 6e 20 | 63 6f 6e 74 72 6f 6c 20 | return |control |
|00002e30| 74 6f 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |to your |applicat|
|00002e40| 69 6f 6e 20 75 6e 74 69 | 6c 20 74 68 65 20 66 69 |ion unti|l the fi|
|00002e50| 6e 61 6c 20 72 65 71 75 | 65 73 74 20 69 73 20 63 |nal requ|est is c|
|00002e60| 6f 6d 70 6c 65 74 65 2e | 29 0d 6e 09 41 73 79 6e |omplete.|).n.Asyn|
|00002e70| 63 68 72 6f 6e 6f 75 73 | 20 72 65 71 75 65 73 74 |chronous| request|
|00002e80| 73 2e 20 57 68 65 6e 20 | 79 6f 75 20 6d 61 6b 65 |s. When |you make|
|00002e90| 20 61 6e 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 | an asyn|chronous|
|00002ea0| 20 72 65 71 75 65 73 74 | 2c 20 74 68 65 20 44 65 | request|, the De|
|00002eb0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 70 6c 61 |vice Man|ager pla|
|00002ec0| 63 65 73 20 79 6f 75 72 | 20 72 65 71 75 65 73 74 |ces your| request|
|00002ed0| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | at the |end of t|
|00002ee0| 68 65 20 64 72 69 76 65 | 72 20 72 65 71 75 65 73 |he drive|r reques|
|00002ef0| 74 20 71 75 65 75 65 2c | 20 62 75 74 20 69 74 20 |t queue,| but it |
|00002f00| 72 65 74 75 72 6e 73 20 | 63 6f 6e 74 72 6f 6c 20 |returns |control |
|00002f10| 74 6f 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |to your |applicat|
|00002f20| 69 6f 6e 20 69 6d 6d 65 | 64 69 61 74 65 6c 79 d1 |ion imme|diately.|
|00002f30| 70 6f 74 65 6e 74 69 61 | 6c 6c 79 20 62 65 66 6f |potentia|lly befo|
|00002f40| 72 65 20 74 68 65 20 72 | 65 71 75 65 73 74 20 69 |re the r|equest i|
|00002f50| 73 20 73 61 74 69 73 66 | 69 65 64 2e 20 59 6f 75 |s satisf|ied. You|
|00002f60| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 69 73 |r applic|ation is|
|00002f70| 20 66 72 65 65 20 74 6f | 20 70 65 72 66 6f 72 6d | free to| perform|
|00002f80| 20 6f 74 68 65 72 20 74 | 61 73 6b 73 20 77 68 69 | other t|asks whi|
|00002f90| 6c 65 20 74 68 65 20 64 | 72 69 76 65 72 20 73 61 |le the d|river sa|
|00002fa0| 74 69 73 66 69 65 73 20 | 74 68 65 20 72 65 71 75 |tisfies |the requ|
|00002fb0| 65 73 74 73 20 69 6e 20 | 69 74 73 20 71 75 65 75 |ests in |its queu|
|00002fc0| 65 2e 20 54 68 65 20 44 | 65 76 69 63 65 20 4d 61 |e. The D|evice Ma|
|00002fd0| 6e 61 67 65 72 20 70 72 | 6f 76 69 64 65 73 20 6d |nager pr|ovides m|
|00002fe0| 65 63 68 61 6e 69 73 6d | 73 20 66 6f 72 20 79 6f |echanism|s for yo|
|00002ff0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 74 |ur appli|cation t|
|00003000| 6f 20 64 65 74 65 72 6d | 69 6e 65 20 77 68 65 6e |o determ|ine when|
|00003010| 20 74 68 65 20 64 72 69 | 76 65 72 20 68 61 73 20 | the dri|ver has |
|00003020| 73 61 74 69 73 66 69 65 | 64 20 74 68 65 20 72 65 |satisfie|d the re|
|00003030| 71 75 65 73 74 2e 20 0d | 6e 09 49 6d 6d 65 64 69 |quest. .|n.Immedi|
|00003040| 61 74 65 20 72 65 71 75 | 65 73 74 73 2e 20 57 68 |ate requ|ests. Wh|
|00003050| 65 6e 20 79 6f 75 20 63 | 61 6c 6c 20 61 20 44 65 |en you c|all a De|
|00003060| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 72 6f 75 |vice Man|ager rou|
|00003070| 74 69 6e 65 20 69 6d 6d | 65 64 69 61 74 65 6c 79 |tine imm|ediately|
|00003080| 2c 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |, the De|vice Man|
|00003090| 61 67 65 72 20 73 65 6e | 64 73 20 79 6f 75 72 20 |ager sen|ds your |
|000030a0| 72 65 71 75 65 73 74 20 | 64 69 72 65 63 74 6c 79 |request |directly|
|000030b0| 20 74 6f 20 74 68 65 20 | 64 72 69 76 65 72 2c 20 | to the |driver, |
|000030c0| 62 79 70 61 73 73 69 6e | 67 20 74 68 65 20 64 72 |bypassin|g the dr|
|000030d0| 69 76 65 72 20 72 65 71 | 75 65 73 74 20 71 75 65 |iver req|uest que|
|000030e0| 75 65 2c 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |ue, and |returns |
|000030f0| 63 6f 6e 74 72 6f 6c 20 | 74 6f 20 79 6f 75 72 20 |control |to your |
|00003100| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 77 68 65 6e |applicat|ion when|
|00003110| 20 74 68 65 20 72 65 71 | 75 65 73 74 20 69 73 20 | the req|uest is |
|00003120| 63 6f 6d 70 6c 65 74 65 | 2e 20 41 6e 20 61 73 79 |complete|. An asy|
|00003130| 6e 63 68 72 6f 6e 6f 75 | 73 20 64 65 76 69 63 65 |nchronou|s device|
|00003140| 20 64 72 69 76 65 72 2c | 20 77 68 69 63 68 20 63 | driver,| which c|
|00003150| 61 6e 20 70 72 6f 63 65 | 73 73 20 61 20 73 69 6e |an proce|ss a sin|
|00003160| 67 6c 65 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6f |gle comm|unicatio|
|00003170| 6e 20 72 65 71 75 65 73 | 74 20 69 6e 20 61 20 6e |n reques|t in a n|
|00003180| 75 6d 62 65 72 20 6f 66 | 20 73 74 65 70 73 2c 20 |umber of| steps, |
|00003190| 6d 69 67 68 74 20 62 65 | 20 69 6e 20 74 68 65 20 |might be| in the |
|000031a0| 6d 69 64 64 6c 65 20 6f | 66 20 70 72 6f 63 65 73 |middle o|f proces|
|000031b0| 73 69 6e 67 20 61 6e 6f | 74 68 65 72 20 72 65 71 |sing ano|ther req|
|000031c0| 75 65 73 74 2e 20 41 20 | 73 69 6d 69 6c 61 72 20 |uest. A |similar |
|000031d0| 73 69 74 75 61 74 69 6f | 6e 20 63 61 6e 20 65 78 |situatio|n can ex|
|000031e0| 69 73 74 20 65 76 65 6e | 20 66 6f 72 20 61 20 73 |ist even| for a s|
|000031f0| 79 6e 63 68 72 6f 6e 6f | 75 73 20 64 65 76 69 63 |ynchrono|us devic|
|00003200| 65 20 64 72 69 76 65 72 | 20 69 66 20 79 6f 75 20 |e driver| if you |
|00003210| 6d 61 6b 65 20 74 68 65 | 20 69 6d 6d 65 64 69 61 |make the| immedia|
|00003220| 74 65 20 72 65 71 75 65 | 73 74 20 64 75 72 69 6e |te reque|st durin|
|00003230| 67 20 69 6e 74 65 72 72 | 75 70 74 20 74 69 6d 65 |g interr|upt time|
|00003240| 2e 20 44 65 76 69 63 65 | 20 64 72 69 76 65 72 73 |. Device| drivers|
|00003250| 20 74 68 61 74 20 63 61 | 6e 20 68 61 6e 64 6c 65 | that ca|n handle|
|00003260| 20 74 68 69 73 20 73 69 | 74 75 61 74 69 6f 6e 20 | this si|tuation |
|00003270| 63 6f 72 72 65 63 74 6c | 79 20 61 72 65 20 63 61 |correctl|y are ca|
|00003280| 6c 6c 65 64 20 72 65 65 | 6e 74 72 61 6e 74 20 64 |lled ree|ntrant d|
|00003290| 72 69 76 65 72 73 2e 20 | 41 73 20 73 6f 6d 65 20 |rivers. |As some |
|000032a0| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 73 20 61 |device d|rivers a|
|000032b0| 72 65 20 6e 6f 74 20 72 | 65 65 6e 74 72 61 6e 74 |re not r|eentrant|
|000032c0| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 61 6c 77 |, you sh|ould alw|
|000032d0| 61 79 73 20 63 68 65 63 | 6b 20 61 20 64 72 69 76 |ays chec|k a driv|
|000032e0| 65 72 d5 73 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |er.s doc|umentati|
|000032f0| 6f 6e 20 62 65 66 6f 72 | 65 20 6d 61 6b 69 6e 67 |on befor|e making|
|00003300| 20 69 6d 6d 65 64 69 61 | 74 65 20 72 65 71 75 65 | immedia|te reque|
|00003310| 73 74 73 2e 0d 54 68 65 | 20 6e 65 78 74 20 73 65 |sts..The| next se|
|00003320| 63 74 69 6f 6e 2c 20 d2 | 55 73 69 6e 67 20 74 68 |ction, .|Using th|
|00003330| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00003340| 2c d3 20 64 65 73 63 72 | 69 62 65 73 20 68 6f 77 |,. descr|ibes how|
|00003350| 20 74 6f 20 73 70 65 63 | 69 66 79 20 74 68 65 20 | to spec|ify the |
|00003360| 6d 61 6e 6e 65 72 20 69 | 6e 20 77 68 69 63 68 20 |manner i|n which |
|00003370| 74 68 65 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |the Devi|ce Manag|
|00003380| 65 72 20 73 68 6f 75 6c | 64 20 70 72 6f 63 65 73 |er shoul|d proces|
|00003390| 73 20 79 6f 75 72 20 72 | 65 71 75 65 73 74 2e 0d |s your r|equest..|
|000033a0| 54 68 65 20 63 68 61 70 | 74 65 72 20 d2 57 72 69 |The chap|ter .Wri|
|000033b0| 74 69 6e 67 20 59 6f 75 | 72 20 4f 77 6e 20 44 65 |ting You|r Own De|
|000033c0| 76 69 63 65 20 44 72 69 | 76 65 72 d3 20 69 6e 20 |vice Dri|ver. in |
|000033d0| 74 68 69 73 20 62 6f 6f | 6b 20 67 69 76 65 73 20 |this boo|k gives |
|000033e0| 6d 6f 72 65 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |more inf|ormation|
|000033f0| 20 61 62 6f 75 74 20 74 | 68 65 20 44 65 76 69 63 | about t|he Devic|
|00003400| 65 20 4d 61 6e 61 67 65 | 72 20 64 61 74 61 20 73 |e Manage|r data s|
|00003410| 74 72 75 63 74 75 72 65 | 73 20 61 6e 64 20 61 6c |tructure|s and al|
|00003420| 73 6f 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |so descr|ibes the|
|00003430| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00003440| 72 6f 75 74 69 6e 65 73 | 20 75 73 65 66 75 6c 20 |routines| useful |
|00003450| 66 6f 72 20 77 72 69 74 | 69 6e 67 20 64 65 76 69 |for writ|ing devi|
|00003460| 63 65 20 64 72 69 76 65 | 72 73 2e 0d 55 73 69 6e |ce drive|rs..Usin|
|00003470| 67 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |g the De|vice Man|
|00003480| 61 67 65 72 0d 59 6f 75 | 72 20 61 70 70 6c 69 63 |ager.You|r applic|
|00003490| 61 74 69 6f 6e 20 63 61 | 6e 20 75 73 65 20 44 65 |ation ca|n use De|
|000034a0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 72 6f 75 |vice Man|ager rou|
|000034b0| 74 69 6e 65 73 20 74 6f | 20 63 6f 6d 6d 75 6e 69 |tines to| communi|
|000034c0| 63 61 74 65 20 77 69 74 | 68 20 64 65 76 69 63 65 |cate wit|h device|
|000034d0| 73 2e 20 49 74 20 63 61 | 6e 20 75 73 65 20 74 68 |s. It ca|n use th|
|000034e0| 65 73 65 20 72 6f 75 74 | 69 6e 65 73 20 74 6f 20 |ese rout|ines to |
|000034f0| 6f 70 65 6e 20 61 6e 64 | 20 63 6c 6f 73 65 20 64 |open and| close d|
|00003500| 65 76 69 63 65 20 64 72 | 69 76 65 72 73 2c 20 74 |evice dr|ivers, t|
|00003510| 6f 20 65 78 63 68 61 6e | 67 65 20 69 6e 66 6f 72 |o exchan|ge infor|
|00003520| 6d 61 74 69 6f 6e 20 77 | 69 74 68 20 74 68 65 6d |mation w|ith them|
|00003530| 2c 20 61 6e 64 20 74 6f | 20 6f 74 68 65 72 77 69 |, and to| otherwi|
|00003540| 73 65 20 63 6f 6e 74 72 | 6f 6c 20 61 6e 64 20 6d |se contr|ol and m|
|00003550| 6f 6e 69 74 6f 72 20 74 | 68 65 6d 2e 0d 54 68 65 |onitor t|hem..The|
|00003560| 20 44 65 76 69 63 65 20 | 4d 61 6e 61 67 65 72 20 | Device |Manager |
|00003570| 69 6e 63 6c 75 64 65 73 | 20 68 69 67 68 2d 6c 65 |includes| high-le|
|00003580| 76 65 6c 20 61 6e 64 20 | 6c 6f 77 2d 6c 65 76 65 |vel and |low-leve|
|00003590| 6c 20 76 65 72 73 69 6f | 6e 73 20 6f 66 20 6d 6f |l versio|ns of mo|
|000035a0| 73 74 20 6f 66 20 69 74 | 73 20 72 6f 75 74 69 6e |st of it|s routin|
|000035b0| 65 73 2e 20 54 68 65 20 | 68 69 67 68 2d 6c 65 76 |es. The |high-lev|
|000035c0| 65 6c 20 76 65 72 73 69 | 6f 6e 73 20 61 72 65 20 |el versi|ons are |
|000035d0| 73 6f 6d 65 77 68 61 74 | 20 65 61 73 69 65 72 20 |somewhat| easier |
|000035e0| 74 6f 20 75 73 65 2c 20 | 62 75 74 20 74 68 65 79 |to use, |but they|
|000035f0| 20 61 6c 6c 6f 77 20 6c | 65 73 73 20 63 6f 6e 74 | allow l|ess cont|
|00003600| 72 6f 6c 20 6f 66 20 68 | 6f 77 20 74 68 65 20 44 |rol of h|ow the D|
|00003610| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 65 78 |evice Ma|nager ex|
|00003620| 65 63 75 74 65 73 20 74 | 68 65 20 72 6f 75 74 69 |ecutes t|he routi|
|00003630| 6e 65 20 28 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |ne (for |example,|
|00003640| 20 74 68 65 79 20 61 6c | 77 61 79 73 20 65 78 65 | they al|ways exe|
|00003650| 63 75 74 65 20 73 79 6e | 63 68 72 6f 6e 6f 75 73 |cute syn|chronous|
|00003660| 6c 79 29 20 61 6e 64 20 | 74 68 65 79 20 72 65 74 |ly) and |they ret|
|00003670| 75 72 6e 20 6c 65 73 73 | 20 69 6e 66 6f 72 6d 61 |urn less| informa|
|00003680| 74 69 6f 6e 20 74 6f 20 | 79 6f 75 72 20 61 70 70 |tion to |your app|
|00003690| 6c 69 63 61 74 69 6f 6e | 2e 20 43 6f 6e 76 65 72 |lication|. Conver|
|000036a0| 73 65 6c 79 2c 20 74 68 | 65 20 6c 6f 77 2d 6c 65 |sely, th|e low-le|
|000036b0| 76 65 6c 20 72 6f 75 74 | 69 6e 65 73 20 72 65 71 |vel rout|ines req|
|000036c0| 75 69 72 65 20 73 6f 6d | 65 20 61 64 64 69 74 69 |uire som|e additi|
|000036d0| 6f 6e 61 6c 20 73 65 74 | 75 70 2c 20 62 75 74 20 |onal set|up, but |
|000036e0| 74 68 65 79 20 61 6c 6c | 6f 77 20 79 6f 75 20 67 |they all|ow you g|
|000036f0| 72 65 61 74 65 72 20 63 | 6f 6e 74 72 6f 6c 20 61 |reater c|ontrol a|
|00003700| 6e 64 20 72 65 74 75 72 | 6e 20 6d 6f 72 65 20 69 |nd retur|n more i|
|00003710| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 0d 54 68 65 20 |nformati|on..The |
|00003720| 68 69 67 68 2d 6c 65 76 | 65 6c 20 72 6f 75 74 69 |high-lev|el routi|
|00003730| 6e 65 73 20 64 69 66 66 | 65 72 20 69 6e 20 66 6f |nes diff|er in fo|
|00003740| 72 6d 2c 20 62 75 74 20 | 74 68 65 20 6c 6f 77 2d |rm, but |the low-|
|00003750| 6c 65 76 65 6c 20 72 6f | 75 74 69 6e 65 73 20 61 |level ro|utines a|
|00003760| 6c 6c 20 68 61 76 65 20 | 74 68 65 20 66 6f 72 6d |ll have |the form|
|00003770| 3a 0d 46 55 4e 43 54 49 | 4f 4e 20 50 42 52 6f 75 |:.FUNCTI|ON PBRou|
|00003780| 74 69 6e 65 4e 61 6d 65 | 09 09 09 09 09 09 09 09 |tineName|........|
|00003790| 09 09 20 28 70 61 72 61 | 6d 42 6c 6f 63 6b 3a 20 |.. (para|mBlock: |
|000037a0| 50 61 72 6d 42 6c 6b 50 | 74 72 3b 20 0d 09 09 09 |ParmBlkP|tr; ....|
|000037b0| 09 09 09 09 09 09 09 09 | 61 73 79 6e 63 3a 20 42 |........|async: B|
|000037c0| 6f 6f 6c 65 61 6e 29 3a | 20 4f 53 45 72 72 3b 0d |oolean):| OSErr;.|
|000037d0| 54 68 65 20 66 69 72 73 | 74 20 70 61 72 61 6d 65 |The firs|t parame|
|000037e0| 74 65 72 20 70 61 72 61 | 6d 42 6c 6f 63 6b 20 69 |ter para|mBlock i|
|000037f0| 73 20 61 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |s a Devi|ce Manag|
|00003800| 65 72 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |er param|eter blo|
|00003810| 63 6b 2e 20 59 6f 75 20 | 63 61 6e 20 75 73 65 20 |ck. You |can use |
|00003820| 66 69 65 6c 64 73 20 6f | 66 20 74 68 69 73 20 64 |fields o|f this d|
|00003830| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 20 74 6f |ata stru|cture to|
|00003840| 20 70 61 73 73 20 6d 6f | 72 65 20 63 6f 6d 70 6c | pass mo|re compl|
|00003850| 65 74 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ete info|rmation |
|00003860| 74 6f 20 74 68 65 20 64 | 72 69 76 65 72 20 74 68 |to the d|river th|
|00003870| 61 6e 20 79 6f 75 20 63 | 61 6e 20 77 69 74 68 20 |an you c|an with |
|00003880| 68 69 67 68 2d 6c 65 76 | 65 6c 20 72 6f 75 74 69 |high-lev|el routi|
|00003890| 6e 65 73 2c 20 61 6e 64 | 20 74 68 65 20 64 72 69 |nes, and| the dri|
|000038a0| 76 65 72 20 75 73 65 73 | 20 74 68 65 20 73 61 6d |ver uses| the sam|
|000038b0| 65 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |e data s|tructure|
|000038c0| 20 74 6f 20 70 61 73 73 | 20 69 6e 66 6f 72 6d 61 | to pass| informa|
|000038d0| 74 69 6f 6e 20 62 61 63 | 6b 2e 20 54 68 65 20 73 |tion bac|k. The s|
|000038e0| 65 63 74 69 6f 6e 20 d2 | 44 61 74 61 20 53 74 72 |ection .|Data Str|
|000038f0| 75 63 74 75 72 65 73 2c | d3 20 6f 6e 20 70 61 67 |uctures,|. on pag|
|00003900| 65 20 31 2d 31 35 2c 20 | 64 69 73 63 75 73 73 65 |e 1-15, |discusse|
|00003910| 73 20 74 68 65 20 66 69 | 65 6c 64 73 20 6f 66 20 |s the fi|elds of |
|00003920| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |the para|meter bl|
|00003930| 6f 63 6b 20 69 6e 20 64 | 65 74 61 69 6c 2e 0d 54 |ock in d|etail..T|
|00003940| 68 65 20 73 65 63 6f 6e | 64 20 70 61 72 61 6d 65 |he secon|d parame|
|00003950| 74 65 72 20 61 73 79 6e | 63 20 73 70 65 63 69 66 |ter asyn|c specif|
|00003960| 69 65 73 20 77 68 65 74 | 68 65 72 20 74 68 65 20 |ies whet|her the |
|00003970| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 73 |Device M|anager s|
|00003980| 68 6f 75 6c 64 20 65 78 | 65 63 75 74 65 20 74 68 |hould ex|ecute th|
|00003990| 65 20 72 6f 75 74 69 6e | 65 20 61 73 79 6e 63 68 |e routin|e asynch|
|000039a0| 72 6f 6e 6f 75 73 6c 79 | 2e 20 49 66 20 79 6f 75 |ronously|. If you|
|000039b0| 20 73 65 74 20 74 68 69 | 73 20 70 61 72 61 6d 65 | set thi|s parame|
|000039c0| 74 65 72 20 74 6f 20 46 | 41 4c 53 45 2c 20 74 68 |ter to F|ALSE, th|
|000039d0| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|000039e0| 20 61 64 64 73 20 74 68 | 65 20 70 61 72 61 6d 65 | adds th|e parame|
|000039f0| 74 65 72 20 62 6c 6f 63 | 6b 20 74 6f 20 74 68 65 |ter bloc|k to the|
|00003a00| 20 64 72 69 76 65 72 20 | 72 65 71 75 65 73 74 20 | driver |request |
|00003a10| 71 75 65 75 65 20 61 6e | 64 20 77 61 69 74 73 20 |queue an|d waits |
|00003a20| 75 6e 74 69 6c 20 74 68 | 65 20 64 72 69 76 65 72 |until th|e driver|
|00003a30| 20 63 6f 6d 70 6c 65 74 | 65 73 20 74 68 65 20 72 | complet|es the r|
|00003a40| 65 71 75 65 73 74 20 28 | 77 68 69 63 68 20 6d 65 |equest (|which me|
|00003a50| 61 6e 73 20 69 74 20 68 | 61 73 20 63 6f 6d 70 6c |ans it h|as compl|
|00003a60| 65 74 65 64 20 61 6c 6c | 20 70 72 65 76 69 6f 75 |eted all| previou|
|00003a70| 73 6c 79 20 71 75 65 75 | 65 64 20 72 65 71 75 65 |sly queu|ed reque|
|00003a80| 73 74 73 29 20 62 65 66 | 6f 72 65 20 72 65 74 75 |sts) bef|ore retu|
|00003a90| 72 6e 69 6e 67 20 63 6f | 6e 74 72 6f 6c 20 74 6f |rning co|ntrol to|
|00003aa0| 20 79 6f 75 72 20 61 70 | 70 6c 69 63 61 74 69 6f | your ap|plicatio|
|00003ab0| 6e 2e 20 0d 49 66 20 79 | 6f 75 20 73 65 74 20 74 |n. .If y|ou set t|
|00003ac0| 68 65 20 61 73 79 6e 63 | 20 70 61 72 61 6d 65 74 |he async| paramet|
|00003ad0| 65 72 20 74 6f 20 54 52 | 55 45 2c 20 74 68 65 20 |er to TR|UE, the |
|00003ae0| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 61 |Device M|anager a|
|00003af0| 64 64 73 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 |dds the |paramete|
|00003b00| 72 20 62 6c 6f 63 6b 20 | 74 6f 20 74 68 65 20 64 |r block |to the d|
|00003b10| 72 69 76 65 72 20 72 65 | 71 75 65 73 74 20 71 75 |river re|quest qu|
|00003b20| 65 75 65 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |eue and |returns |
|00003b30| 63 6f 6e 74 72 6f 6c 20 | 74 6f 20 79 6f 75 72 20 |control |to your |
|00003b40| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 6d 6d 65 |applicat|ion imme|
|00003b50| 64 69 61 74 65 6c 79 2e | 20 49 6e 20 74 68 69 73 |diately.| In this|
|00003b60| 20 63 61 73 65 2c 20 61 | 20 6e 6f 45 72 72 20 72 | case, a| noErr r|
|00003b70| 65 73 75 6c 74 20 63 6f | 64 65 20 73 69 67 6e 69 |esult co|de signi|
|00003b80| 66 69 65 73 20 74 68 61 | 74 20 74 68 65 20 72 65 |fies tha|t the re|
|00003b90| 71 75 65 73 74 20 77 61 | 73 20 73 75 63 63 65 73 |quest wa|s succes|
|00003ba0| 73 66 75 6c 6c 79 20 71 | 75 65 75 65 64 2c 20 6e |sfully q|ueued, n|
|00003bb0| 6f 74 20 74 68 61 74 20 | 74 68 65 20 72 65 71 75 |ot that |the requ|
|00003bc0| 65 73 74 20 77 61 73 20 | 73 75 63 63 65 73 73 66 |est was |successf|
|00003bd0| 75 6c 6c 79 20 63 6f 6d | 70 6c 65 74 65 64 2e 20 |ully com|pleted. |
|00003be0| 59 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |Your app|lication|
|00003bf0| 20 63 61 6e 20 64 65 74 | 65 72 6d 69 6e 65 20 77 | can det|ermine w|
|00003c00| 68 65 6e 20 74 68 65 20 | 64 72 69 76 65 72 20 68 |hen the |driver h|
|00003c10| 61 73 20 63 6f 6d 70 6c | 65 74 65 64 20 74 68 65 |as compl|eted the|
|00003c20| 20 72 65 71 75 65 73 74 | 20 62 79 20 70 65 72 69 | request| by peri|
|00003c30| 6f 64 69 63 61 6c 6c 79 | 20 70 6f 6c 6c 69 6e 67 |odically| polling|
|00003c40| 20 74 68 65 20 69 6f 52 | 65 73 75 6c 74 20 66 69 | the ioR|esult fi|
|00003c50| 65 6c 64 20 6f 66 20 74 | 68 65 20 70 61 72 61 6d |eld of t|he param|
|00003c60| 65 74 65 72 20 62 6c 6f | 63 6b 2e 20 54 68 65 20 |eter blo|ck. The |
|00003c70| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 73 |Device M|anager s|
|00003c80| 65 74 73 20 74 68 69 73 | 20 66 69 65 6c 64 20 74 |ets this| field t|
|00003c90| 6f 20 31 20 77 68 65 6e | 20 74 68 65 20 72 65 71 |o 1 when| the req|
|00003ca0| 75 65 73 74 20 69 73 20 | 71 75 65 75 65 64 2c 20 |uest is |queued, |
|00003cb0| 61 6e 64 20 74 68 65 20 | 64 72 69 76 65 72 20 73 |and the |driver s|
|00003cc0| 74 6f 72 65 73 20 74 68 | 65 20 61 63 74 75 61 6c |tores th|e actual|
|00003cd0| 20 72 65 73 75 6c 74 20 | 63 6f 64 65 20 74 68 65 | result |code the|
|00003ce0| 72 65 20 77 68 65 6e 20 | 69 74 20 63 6f 6d 70 6c |re when |it compl|
|00003cf0| 65 74 65 73 20 74 68 65 | 20 72 65 71 75 65 73 74 |etes the| request|
|00003d00| 2e 0d 59 6f 75 20 63 61 | 6e 20 61 6c 73 6f 20 70 |..You ca|n also p|
|00003d10| 72 6f 76 69 64 65 20 61 | 20 70 6f 69 6e 74 65 72 |rovide a| pointer|
|00003d20| 20 74 6f 20 61 20 63 6f | 6d 70 6c 65 74 69 6f 6e | to a co|mpletion|
|00003d30| 20 72 6f 75 74 69 6e 65 | 20 69 6e 20 74 68 65 20 | routine| in the |
|00003d40| 69 6f 43 6f 6d 70 6c 65 | 74 69 6f 6e 20 66 69 65 |ioComple|tion fie|
|00003d50| 6c 64 20 6f 66 20 74 68 | 65 20 70 61 72 61 6d 65 |ld of th|e parame|
|00003d60| 74 65 72 20 62 6c 6f 63 | 6b 2e 20 54 68 65 20 44 |ter bloc|k. The D|
|00003d70| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 65 78 |evice Ma|nager ex|
|00003d80| 65 63 75 74 65 73 20 74 | 68 69 73 20 72 6f 75 74 |ecutes t|his rout|
|00003d90| 69 6e 65 20 77 68 65 6e | 20 74 68 65 20 64 72 69 |ine when| the dri|
|00003da0| 76 65 72 20 63 6f 6d 70 | 6c 65 74 65 73 20 74 68 |ver comp|letes th|
|00003db0| 65 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 72 |e asynch|ronous r|
|00003dc0| 65 71 75 65 73 74 2e 20 | 0d 41 53 53 45 4d 42 4c |equest. |.ASSEMBL|
|00003dd0| 59 2d 4c 41 4e 47 55 41 | 47 45 20 4e 4f 54 45 0d |Y-LANGUA|GE NOTE.|
|00003de0| 59 6f 75 20 63 61 6e 20 | 63 61 6c 6c 20 61 20 44 |You can |call a D|
|00003df0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 72 6f |evice Ma|nager ro|
|00003e00| 75 74 69 6e 65 20 61 73 | 79 6e 63 68 72 6f 6e 6f |utine as|ynchrono|
|00003e10| 75 73 6c 79 2c 20 62 79 | 70 61 73 73 69 6e 67 20 |usly, by|passing |
|00003e20| 74 68 65 20 72 65 71 75 | 65 73 74 20 71 75 65 75 |the requ|est queu|
|00003e30| 65 2c 20 62 79 20 73 65 | 74 74 69 6e 67 20 74 68 |e, by se|tting th|
|00003e40| 65 20 69 6d 6d 65 64 69 | 61 74 65 20 62 69 74 20 |e immedi|ate bit |
|00003e50| 28 62 69 74 20 39 29 20 | 6f 66 20 74 68 65 20 74 |(bit 9) |of the t|
|00003e60| 72 61 70 20 77 6f 72 64 | 2e 20 48 6f 77 65 76 65 |rap word|. Howeve|
|00003e70| 72 2c 20 72 65 6d 65 6d | 62 65 72 20 74 68 61 74 |r, remem|ber that|
|00003e80| 20 74 68 65 20 64 72 69 | 76 65 72 20 6d 69 67 68 | the dri|ver migh|
|00003e90| 74 20 68 61 76 65 20 61 | 6e 20 61 73 79 6e 63 68 |t have a|n asynch|
|00003ea0| 72 6f 6e 6f 75 73 20 72 | 65 71 75 65 73 74 20 70 |ronous r|equest p|
|00003eb0| 65 6e 64 69 6e 67 2e 20 | 49 6e 20 66 61 63 74 2c |ending. |In fact,|
|00003ec0| 20 69 66 20 79 6f 75 20 | 6d 61 6b 65 20 61 6e 20 | if you |make an |
|00003ed0| 69 6d 6d 65 64 69 61 74 | 65 20 72 65 71 75 65 73 |immediat|e reques|
|00003ee0| 74 20 64 75 72 69 6e 67 | 20 69 6e 74 65 72 72 75 |t during| interru|
|00003ef0| 70 74 20 74 69 6d 65 2c | 20 74 68 65 20 64 72 69 |pt time,| the dri|
|00003f00| 76 65 72 20 6d 69 67 68 | 74 20 62 65 20 63 75 72 |ver migh|t be cur|
|00003f10| 72 65 6e 74 6c 79 20 65 | 78 65 63 75 74 69 6e 67 |rently e|xecuting|
|00003f20| 20 61 6e 6f 74 68 65 72 | 20 72 65 71 75 65 73 74 | another| request|
|00003f30| 2e 20 42 65 20 73 75 72 | 65 20 74 68 65 20 64 72 |. Be sur|e the dr|
|00003f40| 69 76 65 72 20 69 73 20 | 72 65 65 6e 74 72 61 6e |iver is |reentran|
|00003f50| 74 d1 74 68 61 74 20 69 | 73 2c 20 74 68 61 74 20 |t.that i|s, that |
|00003f60| 69 74 20 63 61 6e 20 68 | 61 6e 64 6c 65 20 74 68 |it can h|andle th|
|00003f70| 65 73 65 20 73 69 74 75 | 61 74 69 6f 6e 73 2e 3c |ese situ|ations.<|
|00003f80| 33 36 70 74 5c 3e 5c 78 | 31 32 20 3c 38 62 61 74 |36pt\>\x|12 <8bat|
|00003f90| 5c 3e 75 0d 4f 70 65 6e | 69 6e 67 20 61 6e 64 20 |\>u.Open|ing and |
|00003fa0| 43 6c 6f 73 69 6e 67 20 | 44 65 76 69 63 65 20 44 |Closing |Device D|
|00003fb0| 72 69 76 65 72 73 0d 59 | 6f 75 20 6d 75 73 74 20 |rivers.Y|ou must |
|00003fc0| 6f 70 65 6e 20 61 20 64 | 72 69 76 65 72 20 62 65 |open a d|river be|
|00003fd0| 66 6f 72 65 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |fore you|r applic|
|00003fe0| 61 74 69 6f 6e 20 63 61 | 6e 20 63 6f 6d 6d 75 6e |ation ca|n commun|
|00003ff0| 69 63 61 74 65 20 77 69 | 74 68 20 69 74 2e 20 54 |icate wi|th it. T|
|00004000| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|00004010| 72 20 70 72 6f 76 69 64 | 65 73 20 74 68 72 65 65 |r provid|es three|
|00004020| 20 66 75 6e 63 74 69 6f | 6e 73 20 66 6f 72 20 6f | functio|ns for o|
|00004030| 70 65 6e 69 6e 67 20 64 | 65 76 69 63 65 20 64 72 |pening d|evice dr|
|00004040| 69 76 65 72 73 3a 20 4f | 70 65 6e 44 72 69 76 65 |ivers: O|penDrive|
|00004050| 72 2c 20 50 42 4f 70 65 | 6e 2c 20 61 6e 64 20 4f |r, PBOpe|n, and O|
|00004060| 70 65 6e 53 6c 6f 74 2e | 20 45 61 63 68 20 6f 66 |penSlot.| Each of|
|00004070| 20 74 68 65 73 65 20 66 | 75 6e 63 74 69 6f 6e 73 | these f|unctions|
|00004080| 20 72 65 71 75 69 72 65 | 73 20 61 20 64 72 69 76 | require|s a driv|
|00004090| 65 72 20 6e 61 6d 65 20 | 61 6e 64 20 72 65 74 75 |er name |and retu|
|000040a0| 72 6e 73 20 61 20 64 72 | 69 76 65 72 20 72 65 66 |rns a dr|iver ref|
|000040b0| 65 72 65 6e 63 65 20 6e | 75 6d 62 65 72 2e 0d 41 |erence n|umber..A|
|000040c0| 20 64 72 69 76 65 72 20 | 6e 61 6d 65 20 63 6f 6e | driver |name con|
|000040d0| 73 69 73 74 73 20 6f 66 | 20 61 20 70 65 72 69 6f |sists of| a perio|
|000040e0| 64 20 28 2e 29 20 66 6f | 6c 6c 6f 77 65 64 20 62 |d (.) fo|llowed b|
|000040f0| 79 20 61 6e 79 20 73 65 | 71 75 65 6e 63 65 20 6f |y any se|quence o|
|00004100| 66 20 31 20 74 6f 20 32 | 35 34 20 70 72 69 6e 74 |f 1 to 2|54 print|
|00004110| 69 6e 67 20 63 68 61 72 | 61 63 74 65 72 73 3b 20 |ing char|acters; |
|00004120| 66 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 2e 41 54 |for exam|ple, .AT|
|00004130| 50 20 69 73 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |P is the| name of|
|00004140| 20 6f 6e 65 20 6f 66 20 | 74 68 65 20 68 69 67 68 | one of |the high|
|00004150| 2d 6c 65 76 65 6c 20 41 | 70 70 6c 65 54 61 6c 6b |-level A|ppleTalk|
|00004160| 20 64 72 69 76 65 72 73 | 2e 0d 54 68 65 20 69 6e | drivers|..The in|
|00004170| 69 74 69 61 6c 20 70 65 | 72 69 6f 64 20 69 6e 20 |itial pe|riod in |
|00004180| 61 20 64 72 69 76 65 72 | 20 6e 61 6d 65 20 61 6c |a driver| name al|
|00004190| 6c 6f 77 73 20 74 68 65 | 20 44 65 76 69 63 65 20 |lows the| Device |
|000041a0| 4d 61 6e 61 67 65 72 20 | 61 6e 64 20 74 68 65 20 |Manager |and the |
|000041b0| 46 69 6c 65 20 4d 61 6e | 61 67 65 72 2c 20 77 68 |File Man|ager, wh|
|000041c0| 69 63 68 20 62 6f 74 68 | 20 75 73 65 20 74 68 65 |ich both| use the|
|000041d0| 20 50 42 4f 70 65 6e 20 | 66 75 6e 63 74 69 6f 6e | PBOpen |function|
|000041e0| 2c 20 74 6f 20 64 69 73 | 74 69 6e 67 75 69 73 68 |, to dis|tinguish|
|000041f0| 20 62 65 74 77 65 65 6e | 20 64 65 76 69 63 65 20 | between| device |
|00004200| 64 72 69 76 65 72 20 6e | 61 6d 65 73 20 61 6e 64 |driver n|ames and|
|00004210| 20 66 69 6c 65 20 6e 61 | 6d 65 73 2e 20 46 6f 72 | file na|mes. For|
|00004220| 20 74 68 65 20 73 61 6d | 65 20 72 65 61 73 6f 6e | the sam|e reason|
|00004230| 2c 20 66 69 6c 65 6e 61 | 6d 65 73 20 73 68 6f 75 |, filena|mes shou|
|00004240| 6c 64 20 6e 6f 74 20 73 | 74 61 72 74 20 77 69 74 |ld not s|tart wit|
|00004250| 68 20 61 20 70 65 72 69 | 6f 64 2e 12 3c 33 36 70 |h a peri|od..<36p|
|00004260| 74 5c 3e 5c 78 31 32 20 | 3c 38 62 61 74 5c 3e 75 |t\>\x12 |<8bat\>u|
|00004270| 0d 54 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 |.The Dev|ice Mana|
|00004280| 67 65 72 20 61 73 73 69 | 67 6e 73 20 65 61 63 68 |ger assi|gns each|
|00004290| 20 6f 70 65 6e 20 64 65 | 76 69 63 65 20 64 72 69 | open de|vice dri|
|000042a0| 76 65 72 20 61 20 64 72 | 69 76 65 72 20 72 65 66 |ver a dr|iver ref|
|000042b0| 65 72 65 6e 63 65 20 6e | 75 6d 62 65 72 2e 20 54 |erence n|umber. T|
|000042c0| 68 69 73 20 6e 75 6d 62 | 65 72 20 61 6c 6c 6f 77 |his numb|er allow|
|000042d0| 73 20 74 68 65 20 44 65 | 76 69 63 65 20 4d 61 6e |s the De|vice Man|
|000042e0| 61 67 65 72 20 74 6f 20 | 6c 6f 63 61 74 65 20 74 |ager to |locate t|
|000042f0| 68 65 20 64 72 69 76 65 | 72 d5 73 20 64 65 76 69 |he drive|r.s devi|
|00004300| 63 65 20 63 6f 6e 74 72 | 6f 6c 20 65 6e 74 72 79 |ce contr|ol entry|
|00004310| 20 69 6e 20 74 68 65 20 | 75 6e 69 74 20 74 61 62 | in the |unit tab|
|00004320| 6c 65 2e 0d 54 68 65 20 | 4f 70 65 6e 44 72 69 76 |le..The |OpenDriv|
|00004330| 65 72 20 66 75 6e 63 74 | 69 6f 6e 2c 20 77 68 69 |er funct|ion, whi|
|00004340| 63 68 20 69 73 20 74 68 | 65 20 68 69 67 68 2d 6c |ch is th|e high-l|
|00004350| 65 76 65 6c 20 6f 70 65 | 6e 69 6e 67 20 72 6f 75 |evel ope|ning rou|
|00004360| 74 69 6e 65 2c 20 74 61 | 6b 65 73 20 74 68 65 20 |tine, ta|kes the |
|00004370| 64 72 69 76 65 72 20 6e | 61 6d 65 20 61 73 20 69 |driver n|ame as i|
|00004380| 74 73 20 66 69 72 73 74 | 20 70 61 72 61 6d 65 74 |ts first| paramet|
|00004390| 65 72 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |er and r|eturns t|
|000043a0| 68 65 20 64 72 69 76 65 | 72 20 72 65 66 65 72 65 |he drive|r refere|
|000043b0| 6e 63 65 20 6e 75 6d 62 | 65 72 20 69 6e 20 69 74 |nce numb|er in it|
|000043c0| 73 20 73 65 63 6f 6e 64 | 20 70 61 72 61 6d 65 74 |s second| paramet|
|000043d0| 65 72 2e 0d 4c 69 73 74 | 69 6e 67 20 31 2d 31 20 |er..List|ing 1-1 |
|000043e0| 73 68 6f 77 73 20 68 6f | 77 20 74 6f 20 75 73 65 |shows ho|w to use|
|000043f0| 20 74 68 65 20 4f 70 65 | 6e 44 72 69 76 65 72 20 | the Ope|nDriver |
|00004400| 66 75 6e 63 74 69 6f 6e | 20 74 6f 20 6f 70 65 6e |function| to open|
|00004410| 20 61 20 64 72 69 76 65 | 72 20 66 72 6f 6d 20 61 | a drive|r from a|
|00004420| 20 72 65 73 6f 75 72 63 | 65 20 66 69 6c 65 2e 0d | resourc|e file..|
|00004430| 4f 70 65 6e 69 6e 67 20 | 61 20 64 65 76 69 63 65 |Opening |a device|
|00004440| 20 64 72 69 76 65 72 20 | 66 72 6f 6d 20 61 20 72 | driver |from a r|
|00004450| 65 73 6f 75 72 63 65 20 | 66 69 6c 65 0d 56 41 52 |esource |file.VAR|
|00004460| 20 09 67 44 72 76 72 52 | 65 66 4e 75 6d 09 09 09 | .gDrvrR|efNum...|
|00004470| 3a 20 49 6e 74 65 67 65 | 72 3b 0d 50 52 4f 43 45 |: Intege|r;.PROCE|
|00004480| 44 55 52 45 20 4d 79 4f | 70 65 6e 44 72 69 76 65 |DURE MyO|penDrive|
|00004490| 72 3b 0d 09 09 09 09 56 | 41 52 0d 09 09 09 09 09 |r;.....V|AR......|
|000044a0| 64 72 76 72 48 64 6c 09 | 09 3a 20 48 61 6e 64 6c |drvrHdl.|.: Handl|
|000044b0| 65 3b 0d 09 09 09 09 09 | 64 72 76 72 49 44 09 09 |e;......|drvrID..|
|000044c0| 3a 20 49 6e 74 65 67 65 | 72 3b 0d 09 09 09 09 09 |: Intege|r;......|
|000044d0| 74 65 6d 70 44 72 76 72 | 49 44 09 3a 20 49 6e 74 |tempDrvr|ID.: Int|
|000044e0| 65 67 65 72 3b 0d 09 09 | 09 09 09 64 72 76 72 54 |eger;...|...drvrT|
|000044f0| 79 70 65 09 3a 20 52 65 | 73 54 79 70 65 3b 0d 09 |ype.: Re|sType;..|
|00004500| 09 09 09 09 64 72 76 72 | 4e 61 6d 65 09 3a 20 53 |....drvr|Name.: S|
|00004510| 74 72 32 35 35 3b 0d 09 | 09 09 09 09 65 72 72 09 |tr255;..|....err.|
|00004520| 09 09 3a 20 4f 53 45 72 | 72 3b 0d 09 09 0d 09 09 |..: OSEr|r;......|
|00004530| 09 09 42 45 47 49 4e 0d | 09 09 09 09 09 74 65 6d |..BEGIN.|.....tem|
|00004540| 70 44 72 76 72 49 44 20 | 3a 3d 20 46 69 6e 64 45 |pDrvrID |:= FindE|
|00004550| 6d 70 74 79 53 70 61 63 | 65 49 6e 55 6e 69 74 54 |mptySpac|eInUnitT|
|00004560| 61 62 6c 65 3b 0d 09 0d | 09 09 09 09 09 64 72 76 |able;...|.....drv|
|00004570| 72 48 64 6c 20 3a 3d 20 | 47 65 74 4e 61 6d 65 64 |rHdl := |GetNamed|
|00004580| 52 65 73 6f 75 72 63 65 | 28 27 44 52 56 52 27 2c |Resource|('DRVR',|
|00004590| 27 2e 44 52 49 56 45 52 | 27 29 3b 0d 09 09 09 09 |'.DRIVER|');.....|
|000045a0| 09 47 65 74 52 65 73 49 | 6e 66 6f 28 64 72 76 72 |.GetResI|nfo(drvr|
|000045b0| 48 64 6c 2c 20 64 72 76 | 72 49 44 2c 20 64 72 76 |Hdl, drv|rID, drv|
|000045c0| 72 54 79 70 65 2c 20 64 | 72 76 72 4e 61 6d 65 29 |rType, d|rvrName)|
|000045d0| 3b 0d 09 09 09 09 09 53 | 65 74 52 65 73 49 6e 66 |;......S|etResInf|
|000045e0| 6f 28 64 72 76 72 48 64 | 6c 2c 20 74 65 6d 70 44 |o(drvrHd|l, tempD|
|000045f0| 72 76 72 49 44 2c 20 64 | 72 76 72 4e 61 6d 65 29 |rvrID, d|rvrName)|
|00004600| 3b 0d 09 0d 09 09 09 09 | 09 65 72 72 20 3a 3d 20 |;.......|.err := |
|00004610| 4f 70 65 6e 44 72 69 76 | 65 72 28 27 2e 44 52 49 |OpenDriv|er('.DRI|
|00004620| 56 45 52 27 2c 67 44 72 | 76 72 52 65 66 4e 75 6d |VER',gDr|vrRefNum|
|00004630| 29 3b 0d 09 0d 09 09 09 | 09 09 49 46 20 28 65 72 |);......|..IF (er|
|00004640| 72 20 3d 20 4e 6f 45 72 | 72 29 20 54 48 45 4e 0d |r = NoEr|r) THEN.|
|00004650| 09 09 09 09 09 09 44 65 | 74 61 63 68 52 65 73 6f |......De|tachReso|
|00004660| 75 72 63 65 28 64 72 76 | 72 48 64 6c 29 3b 0d 09 |urce(drv|rHdl);..|
|00004670| 09 0d 09 09 09 09 09 64 | 72 76 72 48 64 6c 20 3a |.......d|rvrHdl :|
|00004680| 3d 20 47 65 74 4e 61 6d | 65 64 52 65 73 6f 75 72 |= GetNam|edResour|
|00004690| 63 65 28 27 44 52 56 52 | 27 2c 64 72 76 72 4e 61 |ce('DRVR|',drvrNa|
|000046a0| 6d 65 29 3b 0d 09 09 09 | 09 09 53 65 74 52 65 73 |me);....|..SetRes|
|000046b0| 49 6e 66 6f 28 64 72 76 | 72 48 64 6c 2c 64 72 76 |Info(drv|rHdl,drv|
|000046c0| 72 49 44 2c 20 64 72 76 | 72 4e 61 6d 65 29 3b 0d |rID, drv|rName);.|
|000046d0| 09 09 09 09 45 4e 44 3b | 0d 54 68 65 20 4f 70 65 |....END;|.The Ope|
|000046e0| 6e 44 72 69 76 65 72 20 | 66 75 6e 63 74 69 6f 6e |nDriver |function|
|000046f0| 20 75 73 65 73 20 74 68 | 65 20 72 65 73 6f 75 72 | uses th|e resour|
|00004700| 63 65 20 49 44 20 6f 66 | 20 74 68 65 20 64 72 69 |ce ID of| the dri|
|00004710| 76 65 72 20 72 65 73 6f | 75 72 63 65 20 74 6f 20 |ver reso|urce to |
|00004720| 64 65 74 65 72 6d 69 6e | 65 20 77 68 65 72 65 20 |determin|e where |
|00004730| 69 6e 20 74 68 65 20 75 | 6e 69 74 20 74 61 62 6c |in the u|nit tabl|
|00004740| 65 20 74 6f 20 73 74 6f | 72 65 20 74 68 65 20 64 |e to sto|re the d|
|00004750| 65 76 69 63 65 20 63 6f | 6e 74 72 6f 6c 20 65 6e |evice co|ntrol en|
|00004760| 74 72 79 20 66 6f 72 20 | 74 68 65 20 64 72 69 76 |try for |the driv|
|00004770| 65 72 2e 20 55 6e 66 6f | 72 74 75 6e 61 74 65 6c |er. Unfo|rtunatel|
|00004780| 79 2c 20 74 68 65 20 4f | 70 65 6e 44 72 69 76 65 |y, the O|penDrive|
|00004790| 72 20 66 75 6e 63 74 69 | 6f 6e 20 64 6f 65 73 20 |r functi|on does |
|000047a0| 6e 6f 74 20 63 68 65 63 | 6b 20 74 6f 20 73 65 65 |not chec|k to see|
|000047b0| 20 69 66 20 61 6e 6f 74 | 68 65 72 20 64 65 76 69 | if anot|her devi|
|000047c0| 63 65 20 63 6f 6e 74 72 | 6f 6c 20 65 6e 74 72 79 |ce contr|ol entry|
|000047d0| 20 69 73 20 61 6c 72 65 | 61 64 79 20 6c 6f 63 61 | is alre|ady loca|
|000047e0| 74 65 64 20 69 6e 20 74 | 68 61 74 20 70 6f 73 69 |ted in t|hat posi|
|000047f0| 74 69 6f 6e 20 69 6e 20 | 74 68 65 20 75 6e 69 74 |tion in |the unit|
|00004800| 20 74 61 62 6c 65 2e 0d | 54 68 65 72 65 66 6f 72 | table..|Therefor|
|00004810| 65 2c 20 74 68 65 20 4d | 79 4f 70 65 6e 44 72 69 |e, the M|yOpenDri|
|00004820| 76 65 72 20 70 72 6f 63 | 65 64 75 72 65 20 62 65 |ver proc|edure be|
|00004830| 67 69 6e 73 20 62 79 20 | 66 69 6e 64 69 6e 67 20 |gins by |finding |
|00004840| 61 6e 20 65 6d 70 74 79 | 20 73 70 61 63 65 20 69 |an empty| space i|
|00004850| 6e 20 74 68 65 20 75 6e | 69 74 20 74 61 62 6c 65 |n the un|it table|
|00004860| 20 61 6e 64 20 74 68 65 | 6e 20 63 68 61 6e 67 65 | and the|n change|
|00004870| 73 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 49 |s the re|source I|
|00004880| 44 20 6f 66 20 74 68 65 | 20 64 72 69 76 65 72 20 |D of the| driver |
|00004890| 72 65 73 6f 75 72 63 65 | 20 62 65 66 6f 72 65 20 |resource| before |
|000048a0| 63 61 6c 6c 69 6e 67 20 | 74 68 65 20 4f 70 65 6e |calling |the Open|
|000048b0| 44 72 69 76 65 72 20 66 | 75 6e 63 74 69 6f 6e 2e |Driver f|unction.|
|000048c0| 20 28 54 68 65 20 63 68 | 61 70 74 65 72 20 d2 57 | (The ch|apter .W|
|000048d0| 72 69 74 69 6e 67 20 59 | 6f 75 72 20 4f 77 6e 20 |riting Y|our Own |
|000048e0| 44 65 76 69 63 65 20 44 | 72 69 76 65 72 d3 20 67 |Device D|river. g|
|000048f0| 69 76 65 73 20 61 20 63 | 6f 6d 70 6c 65 74 65 20 |ives a c|omplete |
|00004900| 64 65 66 69 6e 69 74 69 | 6f 6e 20 6f 66 20 74 68 |definiti|on of th|
|00004910| 65 20 46 69 6e 64 45 6d | 70 74 79 53 70 61 63 65 |e FindEm|ptySpace|
|00004920| 49 6e 55 6e 69 74 54 61 | 62 6c 65 20 66 75 6e 63 |InUnitTa|ble func|
|00004930| 74 69 6f 6e 2e 29 0d 41 | 66 74 65 72 20 74 68 65 |tion.).A|fter the|
|00004940| 20 64 72 69 76 65 72 20 | 69 73 20 6f 70 65 6e 2c | driver |is open,|
|00004950| 20 74 68 65 20 4d 79 4f | 70 65 6e 44 72 69 76 65 | the MyO|penDrive|
|00004960| 72 20 70 72 6f 63 65 64 | 75 72 65 20 64 65 74 61 |r proced|ure deta|
|00004970| 63 68 65 73 20 74 68 65 | 20 72 65 73 6f 75 72 63 |ches the| resourc|
|00004980| 65 20 61 6e 64 20 72 65 | 73 74 6f 72 65 73 20 74 |e and re|stores t|
|00004990| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 72 65 73 6f |he origi|nal reso|
|000049a0| 75 72 63 65 20 49 44 2e | 0d 54 68 65 20 50 42 4f |urce ID.|.The PBO|
|000049b0| 70 65 6e 20 61 6e 64 20 | 4f 70 65 6e 53 6c 6f 74 |pen and |OpenSlot|
|000049c0| 20 66 75 6e 63 74 69 6f | 6e 73 2c 20 77 68 69 63 | functio|ns, whic|
|000049d0| 68 20 61 72 65 20 6c 6f | 77 2d 6c 65 76 65 6c 20 |h are lo|w-level |
|000049e0| 66 75 6e 63 74 69 6f 6e | 73 2c 20 75 73 65 20 74 |function|s, use t|
|000049f0| 68 65 20 44 65 76 69 63 | 65 20 4d 61 6e 61 67 65 |he Devic|e Manage|
|00004a00| 72 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |r parame|ter bloc|
|00004a10| 6b 2c 20 77 68 69 63 68 | 20 69 73 20 64 65 73 63 |k, which| is desc|
|00004a20| 72 69 62 65 64 20 66 75 | 6c 6c 79 20 69 6e 20 d2 |ribed fu|lly in .|
|00004a30| 44 61 74 61 20 53 74 72 | 75 63 74 75 72 65 73 d3 |Data Str|uctures.|
|00004a40| 20 6f 6e 20 70 61 67 65 | 20 31 2d 31 35 2e 20 42 | on page| 1-15. B|
|00004a50| 6f 74 68 20 6f 66 20 74 | 68 65 73 65 20 66 75 6e |oth of t|hese fun|
|00004a60| 63 74 69 6f 6e 73 20 65 | 78 70 65 63 74 20 61 20 |ctions e|xpect a |
|00004a70| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 64 |pointer |to the d|
|00004a80| 72 69 76 65 72 20 6e 61 | 6d 65 20 69 6e 20 74 68 |river na|me in th|
|00004a90| 65 20 69 6f 4e 61 6d 65 | 50 74 72 20 66 69 65 6c |e ioName|Ptr fiel|
|00004aa0| 64 20 6f 66 20 74 68 65 | 20 70 61 72 61 6d 65 74 |d of the| paramet|
|00004ab0| 65 72 20 62 6c 6f 63 6b | 20 61 6e 64 20 72 65 74 |er block| and ret|
|00004ac0| 75 72 6e 20 74 68 65 20 | 72 65 66 65 72 65 6e 63 |urn the |referenc|
|00004ad0| 65 20 6e 75 6d 62 65 72 | 20 69 6e 20 74 68 65 20 |e number| in the |
|00004ae0| 69 6f 52 65 66 4e 75 6d | 20 66 69 65 6c 64 2e 20 |ioRefNum| field. |
|00004af0| 0d 59 6f 75 20 75 73 65 | 20 74 68 65 20 50 42 4f |.You use| the PBO|
|00004b00| 70 65 6e 20 61 6e 64 20 | 4f 70 65 6e 53 6c 6f 74 |pen and |OpenSlot|
|00004b10| 20 66 75 6e 63 74 69 6f | 6e 73 20 69 6e 20 70 72 | functio|ns in pr|
|00004b20| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 74 68 65 20 |eference| to the |
|00004b30| 4f 70 65 6e 44 72 69 76 | 65 72 20 66 75 6e 63 74 |OpenDriv|er funct|
|00004b40| 69 6f 6e 20 77 68 65 6e | 20 79 6f 75 20 77 61 6e |ion when| you wan|
|00004b50| 74 20 6d 6f 72 65 20 63 | 6f 6e 74 72 6f 6c 20 6f |t more c|ontrol o|
|00004b60| 76 65 72 20 68 6f 77 20 | 74 68 65 20 44 65 76 69 |ver how |the Devi|
|00004b70| 63 65 20 4d 61 6e 61 67 | 65 72 20 6f 70 65 6e 73 |ce Manag|er opens|
|00004b80| 20 74 68 65 20 64 65 76 | 69 63 65 20 64 72 69 76 | the dev|ice driv|
|00004b90| 65 72 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |er. For |example,|
|00004ba0| 20 79 6f 75 20 63 61 6e | 20 73 65 74 20 72 65 61 | you can| set rea|
|00004bb0| 64 20 61 6e 64 20 77 72 | 69 74 65 20 70 65 72 6d |d and wr|ite perm|
|00004bc0| 69 73 73 69 6f 6e 73 20 | 66 6f 72 20 74 68 65 20 |issions |for the |
|00004bd0| 64 65 76 69 63 65 20 77 | 69 74 68 20 74 68 65 20 |device w|ith the |
|00004be0| 69 6f 50 65 72 6d 73 73 | 6e 20 66 69 65 6c 64 20 |ioPermss|n field |
|00004bf0| 6f 66 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |of the p|arameter|
|00004c00| 20 62 6c 6f 63 6b 2e 0d | 59 6f 75 20 75 73 65 20 | block..|You use |
|00004c10| 74 68 65 20 4f 70 65 6e | 53 6c 6f 74 20 66 75 6e |the Open|Slot fun|
|00004c20| 63 74 69 6f 6e 20 74 6f | 20 6f 70 65 6e 20 64 72 |ction to| open dr|
|00004c30| 69 76 65 72 73 20 74 68 | 61 74 20 73 65 72 76 65 |ivers th|at serve|
|00004c40| 20 73 6c 6f 74 20 64 65 | 76 69 63 65 73 2e 20 54 | slot de|vices. T|
|00004c50| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 75 73 65 |his func|tion use|
|00004c60| 73 20 61 6e 20 65 78 74 | 65 6e 64 65 64 20 70 61 |s an ext|ended pa|
|00004c70| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 20 74 68 |rameter |block th|
|00004c80| 61 74 20 69 6e 63 6c 75 | 64 65 73 20 65 78 74 72 |at inclu|des extr|
|00004c90| 61 20 66 69 65 6c 64 73 | 20 73 70 65 63 69 66 69 |a fields| specifi|
|00004ca0| 63 20 74 6f 20 73 6c 6f | 74 20 64 65 76 69 63 65 |c to slo|t device|
|00004cb0| 20 64 72 69 76 65 72 73 | 2e 20 59 6f 75 20 75 73 | drivers|. You us|
|00004cc0| 65 20 74 68 65 20 50 42 | 4f 70 65 6e 20 66 75 6e |e the PB|Open fun|
|00004cd0| 63 74 69 6f 6e 20 74 6f | 20 6f 70 65 6e 20 61 6e |ction to| open an|
|00004ce0| 79 20 6f 74 68 65 72 20 | 64 65 76 69 63 65 20 64 |y other |device d|
|00004cf0| 72 69 76 65 72 73 2e 0d | 59 6f 75 20 6d 75 73 74 |rivers..|You must|
|00004d00| 20 6f 70 65 6e 20 64 65 | 76 69 63 65 20 64 72 69 | open de|vice dri|
|00004d10| 76 65 72 73 20 73 79 6e | 63 68 72 6f 6e 6f 75 73 |vers syn|chronous|
|00004d20| 6c 79 2e 20 49 66 20 61 | 20 64 65 76 69 63 65 20 |ly. If a| device |
|00004d30| 64 72 69 76 65 72 20 69 | 73 20 61 6c 72 65 61 64 |driver i|s alread|
|00004d40| 79 20 6f 70 65 6e 2c 20 | 74 68 65 20 64 72 69 76 |y open, |the driv|
|00004d50| 65 72 2d 6f 70 65 6e 69 | 6e 67 20 72 6f 75 74 69 |er-openi|ng routi|
|00004d60| 6e 65 73 20 73 69 6d 70 | 6c 79 20 72 65 74 75 72 |nes simp|ly retur|
|00004d70| 6e 20 74 68 65 20 64 72 | 69 76 65 72 20 72 65 66 |n the dr|iver ref|
|00004d80| 65 72 65 6e 63 65 20 6e | 75 6d 62 65 72 2e 0d 54 |erence n|umber..T|
|00004d90| 68 65 20 72 65 6d 61 69 | 6e 69 6e 67 20 44 65 76 |he remai|ning Dev|
|00004da0| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 72 6f 75 74 |ice Mana|ger rout|
|00004db0| 69 6e 65 73 20 72 65 71 | 75 69 72 65 20 79 6f 75 |ines req|uire you|
|00004dc0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 6f |r applic|ation to|
|00004dd0| 20 75 73 65 20 74 68 65 | 20 72 65 66 65 72 65 6e | use the| referen|
|00004de0| 63 65 20 6e 75 6d 62 65 | 72 2c 20 69 6e 73 74 65 |ce numbe|r, inste|
|00004df0| 61 64 20 6f 66 20 74 68 | 65 20 64 72 69 76 65 72 |ad of th|e driver|
|00004e00| 20 6e 61 6d 65 2c 20 77 | 68 65 6e 20 72 65 66 65 | name, w|hen refe|
|00004e10| 72 72 69 6e 67 20 74 6f | 20 61 20 64 65 76 69 63 |rring to| a devic|
|00004e20| 65 2e 0d 57 68 65 6e 20 | 79 6f 75 20 61 72 65 20 |e..When |you are |
|00004e30| 64 6f 6e 65 20 75 73 69 | 6e 67 20 61 20 64 72 69 |done usi|ng a dri|
|00004e40| 76 65 72 2c 20 79 6f 75 | 20 6d 61 79 20 77 61 6e |ver, you| may wan|
|00004e50| 74 20 74 6f 20 63 6c 6f | 73 65 20 69 74 2e 20 48 |t to clo|se it. H|
|00004e60| 6f 77 65 76 65 72 2c 20 | 79 6f 75 20 73 68 6f 75 |owever, |you shou|
|00004e70| 6c 64 20 67 65 6e 65 72 | 61 6c 6c 79 20 6e 6f 74 |ld gener|ally not|
|00004e80| 20 63 6c 6f 73 65 20 64 | 72 69 76 65 72 73 20 74 | close d|rivers t|
|00004e90| 68 61 74 20 6d 69 67 68 | 74 20 62 65 20 6e 65 65 |hat migh|t be nee|
|00004ea0| 64 65 64 20 62 79 20 74 | 68 65 20 73 79 73 74 65 |ded by t|he syste|
|00004eb0| 6d 20 6f 72 20 62 79 20 | 6f 74 68 65 72 20 61 70 |m or by |other ap|
|00004ec0| 70 6c 69 63 61 74 69 6f | 6e 73 2e 20 57 68 65 74 |plicatio|ns. Whet|
|00004ed0| 68 65 72 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 63 |her you |should c|
|00004ee0| 6c 6f 73 65 20 61 20 70 | 61 72 74 69 63 75 6c 61 |lose a p|articula|
|00004ef0| 72 20 64 72 69 76 65 72 | 20 64 65 70 65 6e 64 73 |r driver| depends|
|00004f00| 20 6f 6e 20 74 68 65 20 | 64 72 69 76 65 72 2e 20 | on the |driver. |
|00004f10| 59 6f 75 20 73 68 6f 75 | 6c 64 20 63 68 65 63 6b |You shou|ld check|
|00004f20| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 | the doc|umentati|
|00004f30| 6f 6e 20 66 6f 72 20 74 | 68 65 20 64 72 69 76 65 |on for t|he drive|
|00004f40| 72 20 69 66 20 79 6f 75 | 20 61 72 65 20 6e 6f 74 |r if you| are not|
|00004f50| 20 73 75 72 65 2e 20 4f | 74 68 65 72 20 63 68 61 | sure. O|ther cha|
|00004f60| 70 74 65 72 73 20 69 6e | 20 49 6e 73 69 64 65 20 |pters in| Inside |
|00004f70| 4d 61 63 69 6e 74 6f 73 | 68 20 67 69 76 65 20 74 |Macintos|h give t|
|00004f80| 68 69 73 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |his info|rmation |
|00004f90| 66 6f 72 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 |for the |standard|
|00004fa0| 20 4d 61 63 69 6e 74 6f | 73 68 20 64 72 69 76 65 | Macinto|sh drive|
|00004fb0| 72 73 2e 0d 49 66 20 79 | 6f 75 20 64 6f 20 77 61 |rs..If y|ou do wa|
|00004fc0| 6e 74 20 74 6f 20 63 6c | 6f 73 65 20 61 20 64 72 |nt to cl|ose a dr|
|00004fd0| 69 76 65 72 2c 20 79 6f | 75 20 63 61 6e 20 75 73 |iver, yo|u can us|
|00004fe0| 65 20 74 68 65 20 68 69 | 67 68 2d 6c 65 76 65 6c |e the hi|gh-level|
|00004ff0| 20 43 6c 6f 73 65 44 72 | 69 76 65 72 20 66 75 6e | CloseDr|iver fun|
|00005000| 63 74 69 6f 6e 20 6f 72 | 20 74 68 65 20 6c 6f 77 |ction or| the low|
|00005010| 2d 6c 65 76 65 6c 20 50 | 42 43 6c 6f 73 65 20 66 |-level P|BClose f|
|00005020| 75 6e 63 74 69 6f 6e 2e | 20 4c 69 73 74 69 6e 67 |unction.| Listing|
|00005030| 20 31 2d 32 20 73 68 6f | 77 73 20 68 6f 77 20 74 | 1-2 sho|ws how t|
|00005040| 6f 20 75 73 65 20 74 68 | 65 20 50 42 43 4c 6f 73 |o use th|e PBCLos|
|00005050| 65 20 66 75 6e 63 74 69 | 6f 6e 20 74 6f 20 63 6c |e functi|on to cl|
|00005060| 6f 73 65 20 74 68 65 20 | 64 72 69 76 65 72 20 6f |ose the |driver o|
|00005070| 70 65 6e 65 64 20 69 6e | 20 4c 69 73 74 69 6e 67 |pened in| Listing|
|00005080| 20 31 2d 31 2e 0d 43 6c | 6f 73 69 6e 67 20 61 20 | 1-1..Cl|osing a |
|00005090| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 0d 50 52 |device d|river.PR|
|000050a0| 4f 43 45 44 55 52 45 20 | 4d 79 43 6c 6f 73 65 44 |OCEDURE |MyCloseD|
|000050b0| 72 69 76 65 72 3b 0d 09 | 09 09 09 56 41 52 0d 09 |river;..|...VAR..|
|000050c0| 09 09 09 09 70 61 72 61 | 6d 42 6c 6f 63 6b 09 3a |....para|mBlock.:|
|000050d0| 20 50 61 72 61 6d 42 6c | 6f 63 6b 52 65 63 3b 0d | ParamBl|ockRec;.|
|000050e0| 09 09 09 09 09 65 72 72 | 09 09 09 3a 20 4f 53 45 |.....err|...: OSE|
|000050f0| 72 72 3b 0d 0d 09 09 09 | 09 42 45 47 49 4e 0d 09 |rr;.....|.BEGIN..|
|00005100| 09 09 09 09 70 61 72 61 | 6d 42 6c 6f 63 6b 2e 69 |....para|mBlock.i|
|00005110| 6f 43 6f 6d 70 6c 65 74 | 69 6f 6e 09 3a 3d 20 6e |oComplet|ion.:= n|
|00005120| 69 6c 3b 0d 09 09 09 09 | 09 70 61 72 61 6d 42 6c |il;.....|.paramBl|
|00005130| 6f 63 6b 2e 69 6f 52 65 | 66 4e 75 6d 09 09 3a 3d |ock.ioRe|fNum..:=|
|00005140| 20 67 44 72 76 72 52 65 | 66 4e 75 6d 3b 0d 09 0d | gDrvrRe|fNum;...|
|00005150| 09 09 09 09 09 65 72 72 | 20 3a 3d 20 50 42 43 6c |.....err| := PBCl|
|00005160| 6f 73 65 20 28 40 70 61 | 72 61 6d 42 6c 6f 63 6b |ose (@pa|ramBlock|
|00005170| 2c 20 46 41 4c 53 45 29 | 3b 0d 09 09 09 09 45 4e |, FALSE)|;.....EN|
|00005180| 44 3b 0d 54 68 65 20 4d | 79 43 6c 6f 73 65 44 72 |D;.The M|yCloseDr|
|00005190| 69 76 65 72 20 70 72 6f | 63 65 64 75 72 65 20 73 |iver pro|cedure s|
|000051a0| 70 65 63 69 66 69 65 73 | 20 74 68 65 20 64 72 69 |pecifies| the dri|
|000051b0| 76 65 72 20 74 6f 20 63 | 6c 6f 73 65 20 62 79 20 |ver to c|lose by |
|000051c0| 70 72 6f 76 69 64 69 6e | 67 20 74 68 65 20 64 72 |providin|g the dr|
|000051d0| 69 76 65 72 20 72 65 66 | 65 72 65 6e 63 65 20 6e |iver ref|erence n|
|000051e0| 75 6d 62 65 72 20 69 6e | 20 74 68 65 20 69 6f 52 |umber in| the ioR|
|000051f0| 65 66 4e 75 6d 20 66 69 | 65 6c 64 20 6f 66 20 74 |efNum fi|eld of t|
|00005200| 68 65 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |he param|eter blo|
|00005210| 63 6b 20 61 6e 64 20 69 | 6e 64 69 63 61 74 65 73 |ck and i|ndicates|
|00005220| 20 74 68 61 74 20 74 68 | 65 20 44 65 76 69 63 65 | that th|e Device|
|00005230| 20 4d 61 6e 61 67 65 72 | 20 73 68 6f 75 6c 64 20 | Manager| should |
|00005240| 6e 6f 74 20 65 78 65 63 | 75 74 65 20 61 20 63 6f |not exec|ute a co|
|00005250| 6d 70 6c 65 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |mpletion| routine|
|00005260| 20 62 79 20 73 70 65 63 | 69 66 79 69 6e 67 20 4e | by spec|ifying N|
|00005270| 49 4c 20 69 6e 20 74 68 | 65 20 69 6f 43 6f 6d 70 |IL in th|e ioComp|
|00005280| 6c 65 74 69 6f 6e 20 66 | 69 65 6c 64 20 6f 66 20 |letion f|ield of |
|00005290| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |the para|meter bl|
|000052a0| 6f 63 6b 2e 20 0d 43 6f | 6d 6d 75 6e 69 63 61 74 |ock. .Co|mmunicat|
|000052b0| 69 6e 67 20 57 69 74 68 | 20 44 65 76 69 63 65 20 |ing With| Device |
|000052c0| 44 72 69 76 65 72 73 0d | 4f 6e 63 65 20 61 20 64 |Drivers.|Once a d|
|000052d0| 72 69 76 65 72 20 69 73 | 20 6f 70 65 6e 20 61 6e |river is| open an|
|000052e0| 64 20 79 6f 75 20 68 61 | 76 65 20 69 74 73 20 72 |d you ha|ve its r|
|000052f0| 65 66 65 72 65 6e 63 65 | 20 6e 75 6d 62 65 72 2c |eference| number,|
|00005300| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 44 65 76 | you can| use Dev|
|00005310| 69 63 65 20 4d 61 6e 61 | 67 65 72 20 63 6f 6d 6d |ice Mana|ger comm|
|00005320| 75 6e 69 63 61 74 69 6f | 6e 20 72 6f 75 74 69 6e |unicatio|n routin|
|00005330| 65 73 20 74 6f 20 65 78 | 63 68 61 6e 67 65 20 69 |es to ex|change i|
|00005340| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 77 69 74 68 20 |nformati|on with |
|00005350| 69 74 2e 0d 57 68 65 6e | 20 79 6f 75 20 77 61 6e |it..When| you wan|
|00005360| 74 20 74 6f 20 73 65 6e | 64 20 69 6e 66 6f 72 6d |t to sen|d inform|
|00005370| 61 74 69 6f 6e 20 74 6f | 20 61 20 64 65 76 69 63 |ation to| a devic|
|00005380| 65 20 64 72 69 76 65 72 | 2c 20 79 6f 75 20 66 69 |e driver|, you fi|
|00005390| 72 73 74 20 73 74 6f 72 | 65 20 74 68 65 20 69 6e |rst stor|e the in|
|000053a0| 66 6f 72 6d 61 74 69 6f | 6e 20 69 6e 20 61 20 64 |formatio|n in a d|
|000053b0| 61 74 61 20 62 75 66 66 | 65 72 20 61 6e 64 20 74 |ata buff|er and t|
|000053c0| 68 65 6e 20 63 61 6c 6c | 20 74 68 65 20 46 53 57 |hen call| the FSW|
|000053d0| 72 69 74 65 20 66 75 6e | 63 74 69 6f 6e 20 6f 72 |rite fun|ction or|
|000053e0| 20 74 68 65 20 50 42 57 | 72 69 74 65 20 66 75 6e | the PBW|rite fun|
|000053f0| 63 74 69 6f 6e 2e 20 57 | 68 65 6e 20 79 6f 75 20 |ction. W|hen you |
|00005400| 77 61 6e 74 20 74 6f 20 | 72 65 63 65 69 76 65 20 |want to |receive |
|00005410| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 66 72 6f 6d |informat|ion from|
|00005420| 20 61 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 | a devic|e driver|
|00005430| 2c 20 79 6f 75 20 66 69 | 72 73 74 20 61 6c 6c 6f |, you fi|rst allo|
|00005440| 63 61 74 65 20 61 20 64 | 61 74 61 20 62 75 66 66 |cate a d|ata buff|
|00005450| 65 72 20 74 6f 20 68 6f | 6c 64 20 74 68 65 20 69 |er to ho|ld the i|
|00005460| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2c 20 61 6e 64 20 |nformati|on, and |
|00005470| 74 68 65 6e 20 63 61 6c | 6c 20 74 68 65 20 46 53 |then cal|l the FS|
|00005480| 52 65 61 64 20 6f 72 20 | 50 42 52 65 61 64 20 66 |Read or |PBRead f|
|00005490| 75 6e 63 74 69 6f 6e 2e | 20 59 6f 75 20 6d 75 73 |unction.| You mus|
|000054a0| 74 20 73 70 65 63 69 66 | 79 20 74 68 65 20 6e 75 |t specif|y the nu|
|000054b0| 6d 62 65 72 20 6f 66 20 | 62 79 74 65 73 20 79 6f |mber of |bytes yo|
|000054c0| 75 20 77 61 6e 74 20 74 | 72 61 6e 73 66 65 72 72 |u want t|ransferr|
|000054d0| 65 64 20 77 68 65 6e 20 | 63 61 6c 6c 69 6e 67 20 |ed when |calling |
|000054e0| 61 6e 79 20 6f 66 20 74 | 68 65 73 65 20 66 75 6e |any of t|hese fun|
|000054f0| 63 74 69 6f 6e 73 2e 0d | 4c 69 6b 65 20 61 6c 6c |ctions..|Like all|
|00005500| 20 6c 6f 77 2d 6c 65 76 | 65 6c 20 72 6f 75 74 69 | low-lev|el routi|
|00005510| 6e 65 73 2c 20 74 68 65 | 20 50 42 57 72 69 74 65 |nes, the| PBWrite|
|00005520| 20 61 6e 64 20 50 42 52 | 65 61 64 20 66 75 6e 63 | and PBR|ead func|
|00005530| 74 69 6f 6e 73 20 61 6c | 6c 6f 77 20 79 6f 75 20 |tions al|low you |
|00005540| 74 6f 20 74 72 61 6e 73 | 66 65 72 20 74 68 65 20 |to trans|fer the |
|00005550| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 61 73 79 6e |informat|ion asyn|
|00005560| 63 68 72 6f 6e 6f 75 73 | 6c 79 2c 20 61 6e 64 20 |chronous|ly, and |
|00005570| 77 69 74 68 20 74 68 65 | 73 65 20 66 75 6e 63 74 |with the|se funct|
|00005580| 69 6f 6e 73 20 79 6f 75 | 20 63 61 6e 20 70 72 6f |ions you| can pro|
|00005590| 76 69 64 65 20 61 20 63 | 6f 6d 70 6c 65 74 69 6f |vide a c|ompletio|
|000055a0| 6e 20 72 6f 75 74 69 6e | 65 2e 20 54 68 65 73 65 |n routin|e. These|
|000055b0| 20 66 75 6e 63 74 69 6f | 6e 73 20 61 6c 73 6f 20 | functio|ns also |
|000055c0| 61 6c 6c 6f 77 20 79 6f | 75 20 74 6f 20 73 70 65 |allow yo|u to spe|
|000055d0| 63 69 66 79 20 61 20 64 | 72 69 76 65 20 6e 75 6d |cify a d|rive num|
|000055e0| 62 65 72 2c 20 61 20 70 | 6f 73 69 74 69 6f 6e 69 |ber, a p|ositioni|
|000055f0| 6e 67 20 6d 6f 64 65 2c | 20 61 6e 64 20 61 20 70 |ng mode,| and a p|
|00005600| 6f 73 69 74 69 6f 6e 69 | 6e 67 20 6f 66 66 73 65 |ositioni|ng offse|
|00005610| 74 20 69 6e 20 74 68 65 | 20 69 6f 56 52 65 66 4e |t in the| ioVRefN|
|00005620| 75 6d 2c 20 69 6f 50 6f | 73 4d 6f 64 65 2c 20 61 |um, ioPo|sMode, a|
|00005630| 6e 64 20 69 6f 50 6f 73 | 4f 66 66 73 65 74 20 66 |nd ioPos|Offset f|
|00005640| 69 65 6c 64 73 20 6f 66 | 20 74 68 65 20 70 61 72 |ields of| the par|
|00005650| 61 6d 65 74 65 72 20 62 | 6c 6f 63 6b 2e 20 54 68 |ameter b|lock. Th|
|00005660| 65 20 44 65 76 69 63 65 | 20 4d 61 6e 61 67 65 72 |e Device| Manager|
|00005670| 20 75 73 65 73 20 74 68 | 65 20 70 6f 73 69 74 69 | uses th|e positi|
|00005680| 6f 6e 69 6e 67 20 6d 6f | 64 65 20 61 6e 64 20 70 |oning mo|de and p|
|00005690| 6f 73 69 74 69 6f 6e 69 | 6e 67 20 6f 66 66 73 65 |ositioni|ng offse|
|000056a0| 74 20 74 6f 20 64 65 74 | 65 72 6d 69 6e 65 20 77 |t to det|ermine w|
|000056b0| 68 65 72 65 20 6f 6e 20 | 61 20 62 6c 6f 63 6b 20 |here on |a block |
|000056c0| 64 65 76 69 63 65 20 74 | 68 65 20 74 72 61 6e 73 |device t|he trans|
|000056d0| 66 65 72 20 77 69 6c 6c | 20 6f 63 63 75 72 2e 20 |fer will| occur. |
|000056e0| 54 68 65 20 44 65 76 69 | 63 65 20 4d 61 6e 61 67 |The Devi|ce Manag|
|000056f0| 65 72 20 73 69 6d 70 6c | 79 20 70 61 73 73 65 73 |er simpl|y passes|
|00005700| 20 74 68 65 20 64 72 69 | 76 65 20 6e 75 6d 62 65 | the dri|ve numbe|
|00005710| 72 20 6f 6e 74 6f 20 74 | 68 65 20 64 72 69 76 65 |r onto t|he drive|
|00005720| 72 2e 20 42 65 20 73 75 | 72 65 20 79 6f 75 20 73 |r. Be su|re you s|
|00005730| 70 65 63 69 66 79 20 74 | 68 65 73 65 20 76 61 6c |pecify t|hese val|
|00005740| 75 65 73 20 69 6e 20 61 | 20 6d 61 6e 6e 65 72 20 |ues in a| manner |
|00005750| 63 6f 6d 70 61 74 69 62 | 6c 65 20 77 69 74 68 20 |compatib|le with |
|00005760| 74 68 65 20 70 61 72 74 | 69 63 75 6c 61 72 20 64 |the part|icular d|
|00005770| 72 69 76 65 72 2e 0d 54 | 68 65 20 44 65 76 69 63 |river..T|he Devic|
|00005780| 65 20 4d 61 6e 61 67 65 | 72 20 64 65 66 69 6e 65 |e Manage|r define|
|00005790| 73 20 74 68 72 65 65 20 | 70 6f 73 69 74 69 6f 6e |s three |position|
|000057a0| 69 6e 67 20 6d 6f 64 65 | 73 20 66 6f 72 20 62 6c |ing mode|s for bl|
|000057b0| 6f 63 6b 20 64 65 76 69 | 63 65 73 3a 0d 6e 09 41 |ock devi|ces:.n.A|
|000057c0| 74 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 70 6f |t the cu|rrent po|
|000057d0| 73 69 74 69 6f 6e 2e 20 | 57 69 74 68 20 74 68 69 |sition. |With thi|
|000057e0| 73 20 6d 6f 64 65 2c 20 | 74 68 65 20 74 72 61 6e |s mode, |the tran|
|000057f0| 73 66 65 72 20 62 65 67 | 69 6e 73 20 61 74 20 74 |sfer beg|ins at t|
|00005800| 68 65 20 63 75 72 72 65 | 6e 74 20 70 6f 73 69 74 |he curre|nt posit|
|00005810| 69 6f 6e 20 6f 6e 20 74 | 68 65 20 6d 65 64 69 75 |ion on t|he mediu|
|00005820| 6d d1 74 79 70 69 63 61 | 6c 6c 79 20 77 68 65 72 |m.typica|lly wher|
|00005830| 65 20 74 68 65 20 6c 61 | 73 74 20 74 72 61 6e 73 |e the la|st trans|
|00005840| 66 65 72 20 65 6e 64 65 | 64 2e 0d 6e 09 4f 66 66 |fer ende|d..n.Off|
|00005850| 73 65 74 20 66 72 6f 6d | 20 74 68 65 20 73 74 61 |set from| the sta|
|00005860| 72 74 2e 20 54 68 69 73 | 20 6d 6f 64 65 20 61 6c |rt. This| mode al|
|00005870| 6c 6f 77 73 20 79 6f 75 | 20 74 6f 20 70 72 6f 76 |lows you| to prov|
|00005880| 69 64 65 20 61 20 70 6f | 73 69 74 69 6f 6e 69 6e |ide a po|sitionin|
|00005890| 67 20 6f 66 66 73 65 74 | 2c 20 77 68 69 63 68 20 |g offset|, which |
|000058a0| 73 70 65 63 69 66 69 65 | 73 20 61 74 20 68 6f 77 |specifie|s at how|
|000058b0| 20 6d 61 6e 79 20 62 79 | 74 65 73 20 66 72 6f 6d | many by|tes from|
|000058c0| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|000058d0| 66 20 74 68 65 20 6d 65 | 64 69 75 6d 20 74 68 65 |f the me|dium the|
|000058e0| 20 74 72 61 6e 73 66 65 | 72 20 77 69 6c 6c 20 62 | transfe|r will b|
|000058f0| 65 67 69 6e 2e 0d 6e 09 | 4f 66 66 73 65 74 20 66 |egin..n.|Offset f|
|00005900| 72 6f 6d 20 74 68 65 20 | 6d 61 72 6b 2e 20 57 69 |rom the |mark. Wi|
|00005910| 74 68 20 74 68 69 73 20 | 6d 6f 64 65 20 79 6f 75 |th this |mode you|
|00005920| 20 63 61 6e 20 70 72 6f | 76 69 64 65 20 61 20 70 | can pro|vide a p|
|00005930| 6f 73 69 74 69 6f 6e 69 | 6e 67 20 6f 66 66 73 65 |ositioni|ng offse|
|00005940| 74 20 74 68 61 74 20 73 | 70 65 63 69 66 69 65 73 |t that s|pecifies|
|00005950| 20 61 74 20 68 6f 77 20 | 6d 61 6e 79 20 62 79 74 | at how |many byt|
|00005960| 65 73 20 66 72 6f 6d 20 | 74 68 65 20 63 75 72 72 |es from |the curr|
|00005970| 65 6e 74 20 70 6f 73 69 | 74 69 6f 6e 20 74 68 65 |ent posi|tion the|
|00005980| 20 74 72 61 6e 73 66 65 | 72 20 77 69 6c 6c 20 62 | transfe|r will b|
|00005990| 65 67 69 6e 2e 20 0d 4f | 6e 20 63 6f 6d 70 6c 65 |egin. .O|n comple|
|000059a0| 74 69 6f 6e 2c 20 74 68 | 65 20 50 42 52 65 61 64 |tion, th|e PBRead|
|000059b0| 20 61 6e 64 20 50 42 57 | 72 69 74 65 20 66 75 6e | and PBW|rite fun|
|000059c0| 63 74 69 6f 6e 73 20 72 | 65 74 75 72 6e 20 74 68 |ctions r|eturn th|
|000059d0| 65 20 74 6f 74 61 6c 20 | 6e 75 6d 62 65 72 20 6f |e total |number o|
|000059e0| 66 20 62 79 74 65 73 20 | 61 63 74 75 61 6c 6c 79 |f bytes |actually|
|000059f0| 20 74 72 61 6e 73 66 65 | 72 72 65 64 20 69 6e 20 | transfe|rred in |
|00005a00| 74 68 65 20 69 6f 41 63 | 74 43 6f 75 6e 74 20 66 |the ioAc|tCount f|
|00005a10| 69 65 6c 64 20 6f 66 20 | 74 68 65 20 70 61 72 61 |ield of |the para|
|00005a20| 6d 65 74 65 72 20 62 6c | 6f 63 6b 2e 20 46 6f 72 |meter bl|ock. For|
|00005a30| 20 62 6c 6f 63 6b 20 64 | 65 76 69 63 65 73 2c 20 | block d|evices, |
|00005a40| 74 68 65 73 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |these fu|nctions |
|00005a50| 61 6c 73 6f 20 72 65 74 | 75 72 6e 20 61 20 6e 65 |also ret|urn a ne|
|00005a60| 77 20 70 6f 73 69 74 69 | 6f 6e 69 6e 67 20 6f 66 |w positi|oning of|
|00005a70| 66 73 65 74 20 69 6e 20 | 74 68 65 20 69 6f 50 6f |fset in |the ioPo|
|00005a80| 73 4f 66 66 73 65 74 20 | 66 69 65 6c 64 2e 0d 43 |sOffset |field..C|
|00005a90| 65 72 74 61 69 6e 20 64 | 65 76 69 63 65 20 64 72 |ertain d|evice dr|
|00005aa0| 69 76 65 72 73 20 70 72 | 6f 76 69 64 65 20 61 64 |ivers pr|ovide ad|
|00005ab0| 64 69 74 69 6f 6e 61 6c | 20 61 62 69 6c 69 74 69 |ditional| abiliti|
|00005ac0| 65 73 20 77 69 74 68 20 | 74 68 65 20 72 65 61 64 |es with |the read|
|00005ad0| 69 6e 67 20 61 6e 64 20 | 77 72 69 74 69 6e 67 20 |ing and |writing |
|00005ae0| 66 75 6e 63 74 69 6f 6e | 73 2e 20 46 6f 72 20 65 |function|s. For e|
|00005af0| 78 61 6d 70 6c 65 2c 20 | 74 68 65 20 44 69 73 6b |xample, |the Disk|
|00005b00| 20 44 72 69 76 65 72 20 | 61 6c 6c 6f 77 73 20 79 | Driver |allows y|
|00005b10| 6f 75 20 74 6f 20 75 73 | 65 20 74 68 65 20 50 42 |ou to us|e the PB|
|00005b20| 52 65 61 64 20 66 75 6e | 63 74 69 6f 6e 20 74 6f |Read fun|ction to|
|00005b30| 20 76 65 72 69 66 79 20 | 74 68 61 74 20 64 61 74 | verify |that dat|
|00005b40| 61 20 77 72 69 74 74 65 | 6e 20 74 6f 20 61 20 62 |a writte|n to a b|
|00005b50| 6c 6f 63 6b 20 64 65 76 | 69 63 65 20 6d 61 74 63 |lock dev|ice matc|
|00005b60| 68 65 73 20 74 68 65 20 | 64 61 74 61 20 69 6e 20 |hes the |data in |
|00005b70| 6d 65 6d 6f 72 79 2e 20 | 54 6f 20 64 6f 20 74 68 |memory. |To do th|
|00005b80| 69 73 2c 20 79 6f 75 20 | 61 64 64 20 74 68 65 20 |is, you |add the |
|00005b90| 72 65 61 64 2d 76 65 72 | 69 66 79 20 63 6f 6e 73 |read-ver|ify cons|
|00005ba0| 74 61 6e 74 0d 43 4f 4e | 53 54 20 72 64 56 65 72 |tant.CON|ST rdVer|
|00005bb0| 69 66 79 20 3d 20 36 34 | 3b 0d 74 6f 20 74 68 65 |ify = 64|;.to the|
|00005bc0| 20 69 6f 50 6f 73 4d 6f | 64 65 20 66 69 65 6c 64 | ioPosMo|de field|
|00005bd0| 20 6f 66 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 | of the |paramete|
|00005be0| 72 20 62 6c 6f 63 6b 2c | 20 61 73 20 65 78 70 6c |r block,| as expl|
|00005bf0| 61 69 6e 65 64 20 69 6e | 20 74 68 65 20 64 65 73 |ained in| the des|
|00005c00| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |cription| of the |
|00005c10| 50 42 52 65 61 64 20 66 | 75 6e 63 74 69 6f 6e 20 |PBRead f|unction |
|00005c20| 69 6e 20 d2 52 6f 75 74 | 69 6e 65 73 2c d3 20 6f |in .Rout|ines,. o|
|00005c30| 6e 20 70 61 67 65 20 31 | 2d 32 36 2e 0d 4c 69 73 |n page 1|-26..Lis|
|00005c40| 74 69 6e 67 20 31 2d 33 | 20 73 68 6f 77 73 20 61 |ting 1-3| shows a|
|00005c50| 6e 20 65 78 61 6d 70 6c | 65 20 74 68 61 74 20 65 |n exampl|e that e|
|00005c60| 78 63 68 61 6e 67 65 73 | 20 69 6e 66 6f 72 6d 61 |xchanges| informa|
|00005c70| 74 69 6f 6e 20 77 69 74 | 68 20 61 20 64 65 76 69 |tion wit|h a devi|
|00005c80| 63 65 20 64 72 69 76 65 | 72 2e 20 0d 43 6f 6d 6d |ce drive|r. .Comm|
|00005c90| 75 6e 69 63 61 74 69 6e | 67 20 77 69 74 68 20 61 |unicatin|g with a|
|00005ca0| 20 64 65 76 69 63 65 20 | 64 72 69 76 65 72 0d 09 | device |driver..|
|00005cb0| 09 09 50 52 4f 43 45 44 | 55 52 45 20 4d 79 52 65 |..PROCED|URE MyRe|
|00005cc0| 61 64 46 72 6f 6d 44 72 | 69 76 65 72 3b 0d 09 09 |adFromDr|iver;...|
|00005cd0| 09 09 56 41 52 0d 09 09 | 09 09 09 70 61 72 61 6d |..VAR...|...param|
|00005ce0| 42 6c 6f 63 6b 09 3a 20 | 50 61 72 61 6d 42 6c 6f |Block.: |ParamBlo|
|00005cf0| 63 6b 52 65 63 3b 0d 09 | 09 09 09 09 65 72 72 09 |ckRec;..|....err.|
|00005d00| 09 09 3a 20 4f 53 45 72 | 72 3b 0d 09 09 09 09 09 |..: OSEr|r;......|
|00005d10| 72 65 61 64 42 75 66 09 | 09 3a 20 53 74 72 32 35 |readBuf.|.: Str25|
|00005d20| 35 3b 0d 0d 09 09 09 09 | 42 45 47 49 4e 0d 09 09 |5;......|BEGIN...|
|00005d30| 09 09 09 70 61 72 61 6d | 42 6c 6f 63 6b 2e 69 6f |...param|Block.io|
|00005d40| 43 6f 6d 70 6c 65 74 69 | 6f 6e 09 3a 3d 20 6e 69 |Completi|on.:= ni|
|00005d50| 6c 3b 0d 09 09 09 09 09 | 70 61 72 61 6d 42 6c 6f |l;......|paramBlo|
|00005d60| 63 6b 2e 69 6f 52 65 66 | 4e 75 6d 09 09 3a 3d 20 |ck.ioRef|Num..:= |
|00005d70| 67 44 72 76 72 52 65 66 | 4e 75 6d 3b 0d 09 09 09 |gDrvrRef|Num;....|
|00005d80| 09 09 70 61 72 61 6d 42 | 6c 6f 63 6b 2e 69 6f 42 |..paramB|lock.ioB|
|00005d90| 75 66 66 65 72 09 09 3a | 3d 20 40 72 65 61 64 42 |uffer..:|= @readB|
|00005da0| 75 66 3b 0d 09 09 09 09 | 09 70 61 72 61 6d 42 6c |uf;.....|.paramBl|
|00005db0| 6f 63 6b 2e 69 6f 52 65 | 71 43 6f 75 6e 74 09 3a |ock.ioRe|qCount.:|
|00005dc0| 3d 20 32 35 36 3b 0d 09 | 0d 09 09 09 09 09 65 72 |= 256;..|......er|
|00005dd0| 72 20 3a 3d 20 50 42 52 | 65 61 64 20 28 40 70 61 |r := PBR|ead (@pa|
|00005de0| 72 61 6d 42 6c 6f 63 6b | 2c 20 46 41 4c 53 45 29 |ramBlock|, FALSE)|
|00005df0| 3b 0d 09 09 09 09 45 4e | 44 3b 0d 0d 50 52 4f 43 |;.....EN|D;..PROC|
|00005e00| 45 44 55 52 45 20 4d 79 | 57 72 69 74 65 54 6f 44 |EDURE My|WriteToD|
|00005e10| 72 69 76 65 72 3b 0d 09 | 09 09 09 56 41 52 0d 09 |river;..|...VAR..|
|00005e20| 09 09 09 09 70 61 72 61 | 6d 42 6c 6f 63 6b 09 3a |....para|mBlock.:|
|00005e30| 20 50 61 72 61 6d 42 6c | 6f 63 6b 52 65 63 3b 0d | ParamBl|ockRec;.|
|00005e40| 09 09 09 09 09 65 72 72 | 09 09 09 3a 20 4f 53 45 |.....err|...: OSE|
|00005e50| 72 72 3b 0d 09 09 09 09 | 09 62 75 66 66 65 72 09 |rr;.....|.buffer.|
|00005e60| 09 3a 20 53 74 72 32 35 | 35 3b 0d 0d 09 09 09 09 |.: Str25|5;......|
|00005e70| 42 45 47 49 4e 0d 09 09 | 09 09 09 62 75 66 66 65 |BEGIN...|...buffe|
|00005e80| 72 20 3a 3d 20 27 44 61 | 74 61 20 74 6f 20 57 72 |r := 'Da|ta to Wr|
|00005e90| 69 74 65 27 3b 0d 0d 09 | 09 09 09 09 70 61 72 61 |ite';...|....para|
|00005ea0| 6d 42 6c 6f 63 6b 2e 69 | 6f 43 6f 6d 70 6c 65 74 |mBlock.i|oComplet|
|00005eb0| 69 6f 6e 09 3a 3d 20 6e | 69 6c 3b 0d 09 09 09 09 |ion.:= n|il;.....|
|00005ec0| 09 70 61 72 61 6d 42 6c | 6f 63 6b 2e 69 6f 52 65 |.paramBl|ock.ioRe|
|00005ed0| 66 4e 75 6d 09 09 3a 3d | 20 67 44 72 76 72 52 65 |fNum..:=| gDrvrRe|
|00005ee0| 66 4e 75 6d 3b 0d 09 09 | 09 09 09 70 61 72 61 6d |fNum;...|...param|
|00005ef0| 42 6c 6f 63 6b 2e 69 6f | 42 75 66 66 65 72 09 09 |Block.io|Buffer..|
|00005f00| 3a 3d 20 40 62 75 66 66 | 65 72 3b 0d 09 09 09 09 |:= @buff|er;.....|
|00005f10| 09 70 61 72 61 6d 42 6c | 6f 63 6b 2e 69 6f 52 65 |.paramBl|ock.ioRe|
|00005f20| 71 43 6f 75 6e 74 09 3a | 3d 20 31 34 3b 0d 09 0d |qCount.:|= 14;...|
|00005f30| 09 09 09 09 09 65 72 72 | 20 3a 3d 20 50 42 57 72 |.....err| := PBWr|
|00005f40| 69 74 65 20 28 40 70 61 | 72 61 6d 42 6c 6f 63 6b |ite (@pa|ramBlock|
|00005f50| 2c 20 46 41 4c 53 45 29 | 3b 0d 09 09 09 09 45 4e |, FALSE)|;.....EN|
|00005f60| 44 3b 0d 54 68 65 20 4d | 79 52 65 61 64 46 72 6f |D;.The M|yReadFro|
|00005f70| 6d 44 72 69 76 65 72 20 | 70 72 6f 63 65 64 75 72 |mDriver |procedur|
|00005f80| 65 20 75 73 65 73 20 61 | 20 70 61 72 61 6d 65 74 |e uses a| paramet|
|00005f90| 65 72 20 62 6c 6f 63 6b | 20 74 6f 20 73 70 65 63 |er block| to spec|
|00005fa0| 69 66 79 20 74 68 65 20 | 64 65 76 69 63 65 20 64 |ify the |device d|
|00005fb0| 72 69 76 65 72 20 28 62 | 79 20 72 65 66 65 72 65 |river (b|y refere|
|00005fc0| 6e 63 65 20 6e 75 6d 62 | 65 72 29 2c 20 74 68 65 |nce numb|er), the|
|00005fd0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 62 79 74 65 73 | number |of bytes|
|00005fe0| 20 74 6f 20 72 65 61 64 | 2c 20 61 20 70 6f 69 6e | to read|, a poin|
|00005ff0| 74 65 72 20 74 6f 20 61 | 20 62 75 66 66 65 72 20 |ter to a| buffer |
|00006000| 74 6f 20 72 65 63 65 69 | 76 65 20 74 68 65 20 64 |to recei|ve the d|
|00006010| 61 74 61 2c 20 61 6e 64 | 20 4e 49 4c 20 66 6f 72 |ata, and| NIL for|
|00006020| 20 74 68 65 20 63 6f 6d | 70 6c 65 74 69 6f 6e 20 | the com|pletion |
|00006030| 72 6f 75 74 69 6e 65 2e | 20 49 74 20 74 68 65 6e |routine.| It then|
|00006040| 20 73 65 6e 64 73 20 74 | 68 65 20 70 61 72 61 6d | sends t|he param|
|00006050| 65 74 65 72 20 62 6c 6f | 63 6b 20 74 6f 20 74 68 |eter blo|ck to th|
|00006060| 65 20 50 42 52 65 61 64 | 20 66 75 6e 63 74 69 6f |e PBRead| functio|
|00006070| 6e 2e 20 54 68 65 20 44 | 65 76 69 63 65 20 4d 61 |n. The D|evice Ma|
|00006080| 6e 61 67 65 72 20 61 70 | 70 65 6e 64 73 20 74 68 |nager ap|pends th|
|00006090| 65 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |e parame|ter bloc|
|000060a0| 6b 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |k to the| end of |
|000060b0| 74 68 65 20 64 72 69 76 | 65 72 d5 73 20 72 65 71 |the driv|er.s req|
|000060c0| 75 65 73 74 20 71 75 65 | 75 65 2e 20 53 69 6e 63 |uest que|ue. Sinc|
|000060d0| 65 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 20 |e the pa|rameter |
|000060e0| 61 73 79 6e 63 20 69 73 | 20 73 65 74 20 74 6f 20 |async is| set to |
|000060f0| 46 41 4c 53 45 2c 20 74 | 68 65 20 44 65 76 69 63 |FALSE, t|he Devic|
|00006100| 65 20 4d 61 6e 61 67 65 | 72 20 64 6f 65 73 20 6e |e Manage|r does n|
|00006110| 6f 74 20 72 65 74 75 72 | 6e 20 63 6f 6e 74 72 6f |ot retur|n contro|
|00006120| 6c 20 74 6f 20 74 68 65 | 20 4d 79 52 65 61 64 46 |l to the| MyReadF|
|00006130| 72 6f 6d 44 72 69 76 65 | 72 20 70 72 6f 63 65 64 |romDrive|r proced|
|00006140| 75 72 65 20 75 6e 74 69 | 6c 20 74 68 65 20 64 72 |ure unti|l the dr|
|00006150| 69 76 65 72 20 68 61 73 | 20 63 6f 6d 70 6c 65 74 |iver has| complet|
|00006160| 65 64 20 65 76 65 72 79 | 20 72 65 71 75 65 73 74 |ed every| request|
|00006170| 20 69 6e 20 69 74 73 20 | 71 75 65 75 65 2e 0d 54 | in its |queue..T|
|00006180| 68 65 20 4d 79 57 72 69 | 74 65 54 6f 44 72 69 76 |he MyWri|teToDriv|
|00006190| 65 72 20 70 72 6f 63 65 | 64 75 72 65 20 75 73 65 |er proce|dure use|
|000061a0| 73 20 61 20 70 61 72 61 | 6d 65 74 65 72 20 62 6c |s a para|meter bl|
|000061b0| 6f 63 6b 20 74 6f 20 73 | 70 65 63 69 66 79 20 74 |ock to s|pecify t|
|000061c0| 68 65 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 |he devic|e driver|
|000061d0| 20 28 62 79 20 72 65 66 | 65 72 65 6e 63 65 20 6e | (by ref|erence n|
|000061e0| 75 6d 62 65 72 29 2c 20 | 74 68 65 20 73 69 7a 65 |umber), |the size|
|000061f0| 20 6f 66 20 74 68 65 20 | 64 61 74 61 20 74 6f 20 | of the |data to |
|00006200| 77 72 69 74 65 2c 20 61 | 20 70 6f 69 6e 74 65 72 |write, a| pointer|
|00006210| 20 74 6f 20 74 68 65 20 | 61 63 74 75 61 6c 20 64 | to the |actual d|
|00006220| 61 74 61 2c 20 61 6e 64 | 20 4e 49 4c 20 66 6f 72 |ata, and| NIL for|
|00006230| 20 74 68 65 20 63 6f 6d | 70 6c 65 74 69 6f 6e 20 | the com|pletion |
|00006240| 72 6f 75 74 69 6e 65 2e | 20 49 74 20 74 68 65 6e |routine.| It then|
|00006250| 20 73 65 6e 64 73 20 74 | 68 65 20 70 61 72 61 6d | sends t|he param|
|00006260| 65 74 65 72 20 62 6c 6f | 63 6b 20 74 6f 20 74 68 |eter blo|ck to th|
|00006270| 65 20 50 42 57 72 69 74 | 65 20 66 75 6e 63 74 69 |e PBWrit|e functi|
|00006280| 6f 6e 2e 20 54 68 65 20 | 44 65 76 69 63 65 20 4d |on. The |Device M|
|00006290| 61 6e 61 67 65 72 20 61 | 70 70 65 6e 64 73 20 74 |anager a|ppends t|
|000062a0| 68 65 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |he param|eter blo|
|000062b0| 63 6b 20 74 6f 20 74 68 | 65 20 65 6e 64 20 6f 66 |ck to th|e end of|
|000062c0| 20 74 68 65 20 64 72 69 | 76 65 72 d5 73 20 72 65 | the dri|ver.s re|
|000062d0| 71 75 65 73 74 20 71 75 | 65 75 65 2e 20 53 69 6e |quest qu|eue. Sin|
|000062e0| 63 65 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |ce the p|arameter|
|000062f0| 20 61 73 79 6e 63 20 69 | 73 20 73 65 74 20 74 6f | async i|s set to|
|00006300| 20 46 41 4c 53 45 2c 20 | 74 68 65 20 44 65 76 69 | FALSE, |the Devi|
|00006310| 63 65 20 4d 61 6e 61 67 | 65 72 20 64 6f 65 73 20 |ce Manag|er does |
|00006320| 6e 6f 74 20 72 65 74 75 | 72 6e 20 63 6f 6e 74 72 |not retu|rn contr|
|00006330| 6f 6c 20 74 6f 20 74 68 | 65 20 4d 79 57 72 69 74 |ol to th|e MyWrit|
|00006340| 65 54 6f 44 72 69 76 65 | 72 20 70 72 6f 63 65 64 |eToDrive|r proced|
|00006350| 75 72 65 20 75 6e 74 69 | 6c 20 74 68 65 20 64 72 |ure unti|l the dr|
|00006360| 69 76 65 72 20 68 61 73 | 20 63 6f 6d 70 6c 65 74 |iver has| complet|
|00006370| 65 64 20 65 76 65 72 79 | 20 72 65 71 75 65 73 74 |ed every| request|
|00006380| 20 69 6e 20 69 74 73 20 | 71 75 65 75 65 2e 0d 43 | in its |queue..C|
|00006390| 6f 6e 74 72 6f 6c 6c 69 | 6e 67 20 61 6e 64 20 4d |ontrolli|ng and M|
|000063a0| 6f 6e 69 74 6f 72 69 6e | 67 20 44 65 76 69 63 65 |onitorin|g Device|
|000063b0| 20 44 72 69 76 65 72 73 | 0d 49 6e 20 61 64 64 69 | Drivers|.In addi|
|000063c0| 74 69 6f 6e 20 74 6f 20 | 74 68 65 20 72 65 61 64 |tion to |the read|
|000063d0| 69 6e 67 20 61 6e 64 20 | 77 72 69 74 69 6e 67 20 |ing and |writing |
|000063e0| 72 6f 75 74 69 6e 65 73 | 2c 20 74 68 65 20 44 65 |routines|, the De|
|000063f0| 76 69 63 65 20 4d 61 6e | 61 67 65 72 20 70 72 6f |vice Man|ager pro|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.